mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-22 14:13:21 +00:00
Fix the number of minutes for a counter to be inactive to 10
This commit is contained in:
parent
0d6b93d085
commit
7f6424d51e
@ -223,10 +223,10 @@ class Counter(models.Model):
|
|||||||
|
|
||||||
def is_inactive(self):
|
def is_inactive(self):
|
||||||
"""
|
"""
|
||||||
Returns True if the counter self is inactive from 5 minutes, else False
|
Returns True if the counter self is inactive from 10 minutes, else False
|
||||||
"""
|
"""
|
||||||
if (self.is_open()):
|
if (self.is_open()):
|
||||||
return ((timezone.now() - self.permanencies.model.objects.order_by('-activity').first().activity) > datetime.timedelta(minutes=5))
|
return ((timezone.now() - self.permanencies.model.objects.order_by('-activity').first().activity) > datetime.timedelta(minutes=10))
|
||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user