Skip to content

Commit

Permalink
Merge pull request #5202 from dimagi/update-subscription-no-end
Browse files Browse the repository at this point in the history
do not fail to update subscription when date_end is None
  • Loading branch information
czue committed Jan 5, 2015
2 parents 9aed2b4 + 2752336 commit bd483d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion corehq/apps/accounting/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -816,7 +816,7 @@ def update_subscription(self, date_start=None, date_end=None,
today = datetime.date.today()
if self.date_end is None or self.date_end > today:
self.date_end = date_end
if self.is_active and self.date_end <= today:
if self.is_active and self.date_end is not None and self.date_end <= today:
self.is_active = False

if (self.date_start > today and date_start is not None
Expand Down

0 comments on commit bd483d8

Please sign in to comment.