mirror of
https://github.com/django/django.git
synced 2025-10-27 07:36:08 +00:00
This commit is contained in:
committed by
Sarah Boyce
parent
384cdf0f7a
commit
84e91262d6
@@ -348,7 +348,7 @@ class ModelBase(type):
|
||||
new_class._meta.parents.update(base_parents)
|
||||
|
||||
# Inherit private fields (like GenericForeignKey) from the parent
|
||||
# class
|
||||
# class if they are not overridden.
|
||||
for field in base._meta.private_fields:
|
||||
if field.name in field_names:
|
||||
if not base._meta.abstract:
|
||||
@@ -361,7 +361,10 @@ class ModelBase(type):
|
||||
base.__name__,
|
||||
)
|
||||
)
|
||||
else:
|
||||
elif (
|
||||
field.name not in new_class.__dict__
|
||||
and field.name not in inherited_attributes
|
||||
):
|
||||
field = copy.deepcopy(field)
|
||||
if not base._meta.abstract:
|
||||
field.mti_inherited = True
|
||||
|
||||
Reference in New Issue
Block a user