Skip to content

Commit

Permalink
Fixes #1069 following data_relation.field
Browse files Browse the repository at this point in the history
  • Loading branch information
einarhuseby authored and nicolaiarocci committed Feb 10, 2019
1 parent 4898012 commit 413d539
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion eve/methods/common.py
Expand Up @@ -984,7 +984,8 @@ def generate_query_and_sorting_criteria(data_relation, references):
id_field_name = (
"_id"
if isinstance(reference, DBRef)
else config.DOMAIN[subresource]["id_field"]
else data_relation.get("field", False)
or config.DOMAIN[subresource]["id_field"]
)
id_field_value = reference.id if isinstance(reference, DBRef) else reference
query["$or"].append({id_field_name: id_field_value})
Expand Down

0 comments on commit 413d539

Please sign in to comment.