bug identified by test fix
This commit is contained in:
parent
8a1d8b8ccf
commit
99ac63f1c2
@ -14,7 +14,8 @@ class Question(models.Model):
|
|||||||
return self.question_text
|
return self.question_text
|
||||||
|
|
||||||
def was_published_recently(self):
|
def was_published_recently(self):
|
||||||
return self.pub_date >= timezone.now() - datetime.timedelta(days=1)
|
now = timezone.now()
|
||||||
|
return now - datetime.timedelta(days=1) <= self.pub_date <= now
|
||||||
|
|
||||||
|
|
||||||
class Choice(models.Model):
|
class Choice(models.Model):
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user