blueprints: fix error when entry with state absent doesn't exist
closes #4305 Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
@ -268,7 +268,7 @@ class Importer:
|
||||
self.logger.debug("updated model", model=model)
|
||||
elif state == BlueprintEntryDesiredState.ABSENT:
|
||||
instance: Optional[Model] = serializer.instance
|
||||
if instance:
|
||||
if instance.pk:
|
||||
instance.delete()
|
||||
self.logger.debug("deleted model", mode=instance)
|
||||
continue
|
||||
|
Reference in New Issue
Block a user