From 7f6424d51e6b6d3abb0b0eeb4f07f0117b92928a Mon Sep 17 00:00:00 2001 From: guillaume-renaud Date: Sun, 16 Oct 2016 19:30:39 +0200 Subject: [PATCH] Fix the number of minutes for a counter to be inactive to 10 --- counter/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/counter/models.py b/counter/models.py index 7ec0c573..038a546a 100644 --- a/counter/models.py +++ b/counter/models.py @@ -223,10 +223,10 @@ class Counter(models.Model): 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()): - 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: return False