From 0450a08aaa8a064f66708135b85d7773a557d4fc Mon Sep 17 00:00:00 2001 From: Drew Larson Date: Sat, 7 Jan 2017 19:18:50 -0600 Subject: [PATCH] =?UTF-8?q?Time=20is=20hard=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bikeshop_project/bike/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bikeshop_project/bike/models.py b/bikeshop_project/bike/models.py index 98199fc..2c0689c 100644 --- a/bikeshop_project/bike/models.py +++ b/bikeshop_project/bike/models.py @@ -78,7 +78,7 @@ class Bike(models.Model): return self.stolen is False and self.cpic_searched_at is not None and self.serial_number is not None def can_claim(self): - return self.claimed_by is None or not (self.claimed_by is not None and self.last_worked_on > timezone.now() + timedelta( + return self.claimed_by is None or not (self.claimed_by is not None and self.last_worked_on > timezone.now() - timedelta( weeks=4)) or self.last_worked_on is None def can_purchase(self):