Skip to content

Commit

Permalink
Merge pull request #1515 from uwcirg/hotfix/update-displayed-qb-due-date
Browse files Browse the repository at this point in the history
pull more relevant due date for IntervStrat html
  • Loading branch information
ivan-c authored Oct 16, 2017
2 parents 7e9a260 + 1ef25ee commit a615bb0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions portal/models/intervention_strategies.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,11 @@ def intro_html(assessment_status):

if assessment_status.overall_status in (
'Due', 'Overdue', 'In Progress'):
utc_due_date = assessment_status.next_available_due_date()
due_date = localize_datetime(utc_due_date, user)
qb = assessment_status.qb_data.qb
trigger_date = qb.trigger_date(user)
utc_due = qb.calculated_start(trigger_date).relative_start
utc_due = qb.calculated_due(trigger_date) or utc_due
due_date = localize_datetime(utc_due, user)
assert due_date
greeting = _(u"Hi {}").format(user.display_name)
reminder = _(
Expand Down

0 comments on commit a615bb0

Please sign in to comment.