Skip to content

Conversation

leifurhauks
Copy link

Previously, if a ResourceRelatedField was passed as input an invalid
resource identifier object missing either the 'type' or 'id' attributes,
this resulted in an uncaught KeyError and a 500 error. This commit
adds validation that the object contains both a 'type' and 'id' attribute.
It fails with a helpful error message.

Previously, if a ResourceRelatedField was passed as input an invalid
resource identifier object missing either the 'type' or 'id' attributes,
this resulted in an uncaught KeyError and a 500 error. This commit
adds validation that the object contains both a 'type' and 'id' attribute.
It fails with a helpful error message.
jerel added a commit that referenced this pull request Jan 14, 2016
…alidation

ResourceRelatedField validation
@jerel jerel merged commit ccb8bb2 into django-json-api:develop Jan 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants