mirror of
https://github.com/django/django.git
synced 2025-06-01 17:49:12 +00:00
Fixed #35246 -- Made Field.unique a cached property.
Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
This commit is contained in:
parent
73d5eb8084
commit
e65deb7d14
@ -916,7 +916,7 @@ class Field(RegisterLookupMixin):
|
|||||||
return [self.from_db_value]
|
return [self.from_db_value]
|
||||||
return []
|
return []
|
||||||
|
|
||||||
@property
|
@cached_property
|
||||||
def unique(self):
|
def unique(self):
|
||||||
return self._unique or self.primary_key
|
return self._unique or self.primary_key
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user