blueprints: fix error when cleaning up unset attribute

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2022-10-21 22:12:59 +02:00
parent 661d2ec701
commit b0d4f035f1
1 changed files with 1 additions and 1 deletions

View File

@ -63,7 +63,7 @@ class BlueprintEntry:
all_attrs = get_attrs(model) all_attrs = get_attrs(model)
for extra_identifier_name in extra_identifier_names: for extra_identifier_name in extra_identifier_names:
identifiers[extra_identifier_name] = all_attrs.pop(extra_identifier_name) identifiers[extra_identifier_name] = all_attrs.pop(extra_identifier_name, None)
return BlueprintEntry( return BlueprintEntry(
identifiers=identifiers, identifiers=identifiers,
model=f"{model._meta.app_label}.{model._meta.model_name}", model=f"{model._meta.app_label}.{model._meta.model_name}",