Merge pull request #16 from leephillips/ap
A task with no due date created an error when checking for completion.
This commit is contained in:
commit
237d96d386
1 changed files with 1 additions and 1 deletions
|
@ -50,7 +50,7 @@ class Item(models.Model):
|
||||||
# Model method: Has due date for an instance of this object passed?
|
# Model method: Has due date for an instance of this object passed?
|
||||||
def overdue_status(self):
|
def overdue_status(self):
|
||||||
"Returns whether the item's due date has passed or not."
|
"Returns whether the item's due date has passed or not."
|
||||||
if datetime.date.today() > self.due_date:
|
if self.due_date and datetime.date.today() > self.due_date:
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
def __unicode__(self):
|
def __unicode__(self):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue