Commit 70b50134 by Kálmán Viktor

storage: fix Disk.create_empty activity problem

parent d4737b15
......@@ -287,13 +287,9 @@ class Disk(AclBase, TimeStampedModel):
:return: Disk object without a real image, to be .deploy()ed later.
with disk_activity(code_suffix="create", user=user) as act:
disk = cls(**kwargs)
if disk.filename is None:
act.disk = disk
disk = cls.objects.create(**kwargs)
with disk_activity(code_suffix="create", user=user, disk=disk):
if instance:
return disk
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment