fallback for lookup in deleted_existing

This commit is contained in:
Laura Klünder 2017-06-27 03:28:39 +02:00
parent c57505812f
commit 63cff64599

View file

@ -481,7 +481,7 @@ class BaseQueryWrapper(BaseWrapper):
# if the check is just 'pk' or the name or the name of the primary key, return the mathing object
if is_created_pk(filter_value):
return Q(pk__in=()), set([filter_value])
if int(filter_value) in self._changeset.deleted_existing[model]:
if int(filter_value) in self._changeset.deleted_existing.get(model, ()):
return Q(pk__in=()), set()
return q, set()
elif segments == ['in']: