Commit a16f7102 by Kálmán Viktor

vm: fix readable time in Lease

parent 0c979fc1
...@@ -83,12 +83,12 @@ class Lease(Model): ...@@ -83,12 +83,12 @@ class Lease(Model):
self.delete_interval_seconds = value.total_seconds() self.delete_interval_seconds = value.total_seconds()
def get_readable_suspend_time(self): def get_readable_suspend_time(self):
return timeuntil(datetime.utcnow() + self.suspend_interval, n = datetime.utcnow()
datetime.utcnow()) return timeuntil(n + self.suspend_interval, n)
def get_readable_delete_time(self): def get_readable_delete_time(self):
return timeuntil(datetime.utcnow() + self.delete_interval, n = datetime.utcnow()
datetime.utcnow()) return timeuntil(n + self.delete_interval, n)
def __unicode__(self): def __unicode__(self):
return "%s (%s) - (%s)" % (self.name, return "%s (%s) - (%s)" % (self.name,
......
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