From 99dcb1e7ca6665935c09b0e395a2ff1c21b59b2c Mon Sep 17 00:00:00 2001 From: Christopher Charbonneau Wells Date: Sat, 9 Sep 2017 13:00:13 -0400 Subject: [PATCH] Fixer Timer.stop method to respect custom end argument. --- core/models.py | 2 +- core/templates/core/timer_detail.html | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/core/models.py b/core/models.py index 575b804e..3ab58e84 100644 --- a/core/models.py +++ b/core/models.py @@ -182,7 +182,7 @@ class Timer(models.Model): def stop(self, end=None): """Stop the timer.""" if not self.end: - self.end = timezone.now() + end = timezone.now() self.end = end self.save() diff --git a/core/templates/core/timer_detail.html b/core/templates/core/timer_detail.html index 90b5d723..5f48c515 100644 --- a/core/templates/core/timer_detail.html +++ b/core/templates/core/timer_detail.html @@ -48,14 +48,16 @@ role="button"> {% endif %} - {% if object.active and perms.core.change_timer %} + {% if perms.core.change_timer %} - + {% if object.active %} + + {% endif %} {% endif %}