Commit 0d6b93d0 authored by Lo-J's avatar Lo-J Committed by Skia

Add inactive state for counters

parent be7e0401
......@@ -223,10 +223,10 @@ class Counter(models.Model):
def is_inactive(self):
"""
Returns True if the counter self is inactive from 10 minutes, else False
Returns True if the counter self is inactive from 5 minutes, else False
"""
if (self.is_open()):
return ((timezone.now() - self.permanencies.model.objects.order_by('-activity').first().activity) > datetime.timedelta(minutes=10))
return ((timezone.now() - self.permanencies.model.objects.order_by('-activity').first().activity) > datetime.timedelta(minutes=5))
else:
return False
......
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 to comment