Fixed #29093 -- Simplified a few lines in ModelBase.__new__().

This commit is contained in:
Дилян Палаузов 2018-01-31 10:21:41 -05:00 committed by Tim Graham
parent 4775dcb521
commit f427ffcccb
1 changed files with 1 additions and 4 deletions

View File

@ -78,10 +78,7 @@ class ModelBase(type):
new_class = super_new(cls, name, bases, new_attrs, **kwargs)
attr_meta = attrs.pop('Meta', None)
abstract = getattr(attr_meta, 'abstract', False)
if not attr_meta:
meta = getattr(new_class, 'Meta', None)
else:
meta = attr_meta
meta = attr_meta or getattr(new_class, 'Meta', None)
base_meta = getattr(new_class, '_meta', None)
app_label = None