summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
Diffstat (limited to 'django')
-rw-r--r--django/db/models/options.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/django/db/models/options.py b/django/db/models/options.py
index f842faf0da..ed7be7dd7a 100644
--- a/django/db/models/options.py
+++ b/django/db/models/options.py
@@ -969,12 +969,14 @@ class Options:
def _property_names(self):
"""Return a set of the names of the properties defined on the model."""
names = set()
+ seen = set()
for klass in self.model.__mro__:
names |= {
name
for name, value in klass.__dict__.items()
- if isinstance(value, property)
+ if isinstance(value, property) and name not in seen
}
+ seen |= set(klass.__dict__)
return frozenset(names)
@cached_property