Bugfix: null Foreign Keys on /v2/items remain null when depth>0
#632
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #621
This PR addresses a bug on the
/v2/itemsendpoint where theweaponandarmorfields where returning inconsistant results when different depth query parameters were passed with API requests. These fields might have returnednullat depth=0, but instead returned a large object with mostly empty keys.Follow this bugfix, null
"weapon"and"armor"fields now remain null at all depths./v2/items/srd_alchemists-fire-flask/?fields=name,weapon,armor&depth=1Items with a defined
"armor"or"weapon"work as they did before:/v2/items/srd_longsword/?fields=name,weapon,armor&depth=1/v2/items/srd_chain-mail/?fields=name,weapon,armor&depth=1