Skip to content
This repository has been archived by the owner on Feb 7, 2019. It is now read-only.

Commit

Permalink
Slight syntax change: updating base filtering dict w/ kwargs now
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeckelmann Manuel authored and Jeckelmann Manuel committed Sep 10, 2017
1 parent 88e36a4 commit a8ec3c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions versions/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ def get_reverse_related_filter(self, obj):
base_filter = {}
for lh_field, rh_field in self.related_fields:
if isinstance(obj, Versionable) and rh_field.attname == Versionable.VERSION_IDENTIFIER_FIELD:
base_filter.update({Versionable.OBJECT_IDENTIFIER_FIELD: getattr(obj, lh_field.attname)})
base_filter.update(**{Versionable.OBJECT_IDENTIFIER_FIELD: getattr(obj, lh_field.attname)})
else:
base_filter.update({rh_field.attname: getattr(obj, lh_field.attname)})
base_filter.update(**{rh_field.attname: getattr(obj, lh_field.attname)})
base_filter.update(self.get_extra_descriptor_filter(obj) or {})
return base_filter
# return super(VersionedForeignKey, self).get_reverse_related_filter(obj)
Expand Down

0 comments on commit a8ec3c7

Please sign in to comment.