mirror of
https://github.com/django/django.git
synced 2025-08-25 04:54:45 +00:00
Fixed #30628 -- Adjusted expression identity to differentiate bound fields.
Expressions referring to different bound fields should not be
considered equal.
Thanks Julien Enselme for the detailed report.
Regression in bc7e288ca9
.
This commit is contained in:
parent
1bbf77bea5
commit
ee6e93ec87
6 changed files with 37 additions and 5 deletions
|
@ -376,7 +376,10 @@ class BaseExpression:
|
|||
identity = [self.__class__]
|
||||
for arg, value in arguments:
|
||||
if isinstance(value, fields.Field):
|
||||
value = type(value)
|
||||
if value.name and value.model:
|
||||
value = (value.model._meta.label, value.name)
|
||||
else:
|
||||
value = type(value)
|
||||
else:
|
||||
value = make_hashable(value)
|
||||
identity.append((arg, value))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue