Use a default value for the "embedded" config

This commit is contained in:
Andrew Brookins 2021-10-13 12:58:10 -07:00
parent e59e210834
commit bb08fb9eb5
2 changed files with 2 additions and 1 deletions

View file

@ -834,7 +834,7 @@ class ModelMeta(ModelMetaclass):
# Not an abstract model class or embedded model, so we should let the
# Migrator create indexes for it.
if abc.ABC not in bases and not new_class._meta.embedded:
if abc.ABC not in bases and not getattr(new_class._meta, 'embedded', False):
key = f"{new_class.__module__}.{new_class.__qualname__}"
model_registry[key] = new_class