From a8ec3c7a1efa0fb0cb7bdcf7a17e4b471fa5c642 Mon Sep 17 00:00:00 2001 From: Jeckelmann Manuel Date: Sun, 10 Sep 2017 22:22:04 +0200 Subject: [PATCH] Slight syntax change: updating base filtering dict w/ kwargs now --- versions/fields.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/versions/fields.py b/versions/fields.py index dd27f04..1d18466 100644 --- a/versions/fields.py +++ b/versions/fields.py @@ -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)