Commit ab138702 by Dudás Ádám

vm: fill empty time_of_delete field on model clean

parent b31f9b65
......@@ -423,6 +423,11 @@ class Instance(AclBase, VirtualMachineDescModel, TimeStampedModel):
parts = [, "(" + str( + ")"]
return " ".join([s for s in parts if s != ""])
def clean(self, *args, **kwargs):
if self.time_of_delete is None:
super(Instance, self).clean(*args, **kwargs)
def create_from_template(cls, template, owner, disks=None, networks=None,
req_traits=None, tags=None, **kwargs):
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