Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 43fd5ee

Browse files
amwjerel
authored andcommitted
Don't set id to None when it wasn't submitted. (#280)
1 parent 14b8920 commit 43fd5ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎rest_framework_json_api/parsers.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def parse(self, stream, media_type=None, parser_context=None):
9292
raise ParseError("The resource identifier object must contain an 'id' member")
9393

9494
# Construct the return data
95-
parsed_data = {'id': data.get('id')}
95+
parsed_data = {'id': data.get('id')}if'id'indataelse {}
9696
parsed_data.update(self.parse_attributes(data))
9797
parsed_data.update(self.parse_relationships(data))
9898
parsed_data.update(self.parse_metadata(result))

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /