Skip to content

Commit

Permalink
Add missing annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
dmoisset committed Sep 2, 2016
1 parent 6ea0e64 commit 07a8f6b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion polls/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class Question(models.Model):
def __str__(self) -> str:
return self.question_text

def was_published_recently(self):
def was_published_recently(self) -> bool:
now = timezone.now()
return now - datetime.timedelta(days=1) <= self.pub_date <= now
was_published_recently.admin_order_field = 'pub_date'
Expand Down

0 comments on commit 07a8f6b

Please sign in to comment.