Commit 0c979fc1 by Kálmán Viktor

vm: fix lease seconds inaccuracy for intervals longer than a day

parent 21333f3b
......@@ -72,7 +72,7 @@ class Lease(Model):
def suspend_interval(self, value):
self.suspend_interval_seconds = value.seconds
self.suspend_interval_seconds = value.total_seconds()
def delete_interval(self):
......@@ -80,7 +80,7 @@ class Lease(Model):
def delete_interval(self, value):
self.delete_interval_seconds = value.seconds
self.delete_interval_seconds = value.total_seconds()
def get_readable_suspend_time(self):
return timeuntil(datetime.utcnow() + self.suspend_interval,
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