From 4795162dbcd02e941c3d67bcc054e8e66b438180 Mon Sep 17 00:00:00 2001 From: Drew Larson Date: Sat, 7 Jan 2017 12:58:56 -0600 Subject: [PATCH] Check stolen is False. --- 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 cc1b3e7..416fd62 100644 --- a/bikeshop_project/bike/models.py +++ b/bikeshop_project/bike/models.py @@ -75,7 +75,7 @@ class Bike(models.Model): and self.price is not None def can_available(self): - return self.stolen is not None and self.cpic_searched_at is not None and self.serial_number is not None + 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 self.last_worked_on > timezone.now() + timedelta(weeks=4)