Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixes a bad if condition that doesn't work
  • Loading branch information
duk3luk3 committed Jan 8, 2018
1 parent 63f9f45 commit f9328b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sqlalchemy_jsonapi/serializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1043,7 +1043,7 @@ def post_collection(self, session, data, api_type):
raise BadRequestError(
'{} must be an array'.format(key))
for item in data_rel:
if not {'type', 'id'} in set(item.keys()):
if 'type' not in item.keys() or 'id' not in item.keys():
raise BadRequestError(
'{} must have type and id keys'.format(key))
# pragma: no cover
Expand Down

0 comments on commit f9328b7

Please sign in to comment.