Small guard to prevent problems with us is_closed calculation on us without status

remotes/origin/enhancement/email-actions
Jesús Espino 2014-07-22 12:41:05 +02:00
parent d5df49f59a
commit 09b94fa2d2
1 changed files with 3 additions and 0 deletions

View File

@ -63,6 +63,9 @@ def update_userstories_order_in_bulk(bulk_data):
def calculate_userstory_is_closed(user_story):
if user_story.status is None:
return False
if user_story.tasks.count() == 0:
return user_story.status.is_closed