fix error in lookup with pk=None
This commit is contained in:
parent
86361babe2
commit
66ce1799e8
1 changed files with 1 additions and 1 deletions
|
@ -412,7 +412,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 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):
|
if is_created_pk(filter_value):
|
||||||
return Q(pk__in=()), set([filter_value])
|
return Q(pk__in=()), set([filter_value])
|
||||||
if int(filter_value) in self._changeset.deleted_existing.get(model, ()):
|
if filter_value is None or int(filter_value) in self._changeset.deleted_existing.get(model, ()):
|
||||||
return Q(pk__in=()), set()
|
return Q(pk__in=()), set()
|
||||||
return q, set()
|
return q, set()
|
||||||
elif segments == ['in']:
|
elif segments == ['in']:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue