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
|
instance.status = BlueprintInstanceStatus.ERROR
|
||||||
self.set_status(TaskResult(TaskResultStatus.ERROR).with_error(exc))
|
self.set_status(TaskResult(TaskResultStatus.ERROR).with_error(exc))
|
||||||
finally:
|
finally:
|
||||||
|
if importer.blueprint.metadata:
|
||||||
instance.metadata = asdict(importer.blueprint.metadata)
|
instance.metadata = asdict(importer.blueprint.metadata)
|
||||||
instance.save()
|
instance.save()
|
||||||
|
|
Reference in New Issue