mirror of https://github.com/django/django.git
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 []
|
||||
|
||||
@property
|
||||
@cached_property
|
||||
def unique(self):
|
||||
return self._unique or self.primary_key
|
||||
|
||||
|
|
Loading…
Reference in New Issue