blueprints: handle blueprints without metadata
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
d49431cfc7
commit
e994a01e80
|
@ -170,5 +170,6 @@ def apply_blueprint(self: MonitoredTask, instance_pk: str):
|
|||
instance.status = BlueprintInstanceStatus.ERROR
|
||||
self.set_status(TaskResult(TaskResultStatus.ERROR).with_error(exc))
|
||||
finally:
|
||||
instance.metadata = asdict(importer.blueprint.metadata)
|
||||
if importer.blueprint.metadata:
|
||||
instance.metadata = asdict(importer.blueprint.metadata)
|
||||
instance.save()
|
||||
|
|
Reference in New Issue