From f427ffcccbb29550d18eff4ee255e278157b240d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=B8=D0=BB=D1=8F=D0=BD=20=D0=9F=D0=B0=D0=BB=D0=B0?= =?UTF-8?q?=D1=83=D0=B7=D0=BE=D0=B2?= Date: Wed, 31 Jan 2018 10:21:41 -0500 Subject: [PATCH] Fixed #29093 -- Simplified a few lines in ModelBase.__new__(). --- django/db/models/base.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/django/db/models/base.py b/django/db/models/base.py index 8d4e19fa5a..20d1c73ddf 100644 --- a/django/db/models/base.py +++ b/django/db/models/base.py @@ -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