Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

Commit

Permalink
fixed tiny bug in a relation's variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
mostafa committed Jan 28, 2018
1 parent b6172dc commit 11fbe73
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion grest/grest.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ def get(self, primary_id, secondary_model_name=None, secondary_id=None):
item_info = item.to_dict()
relation = getattr(primary_model, secondary_model_name)
if (relation.definition["model"] is not None):
item_info["relationship"] = related_item.to_dict()
item_info["relationship"] = item.to_dict()
relationships.append(item_info)

return serialize({inflect.engine().plural(secondary_model.__name__.lower()):
Expand Down

0 comments on commit 11fbe73

Please sign in to comment.