Added an improved guard against trying to fetch milestones for a group value of None.
- Legacy-Id: 12989
This commit is contained in:
parent
707b006d17
commit
8eb447e77f
|
@ -126,7 +126,7 @@ def historic_milestones_for_charter(charter, rev):
|
|||
just_before_next_rev = datetime.datetime.now()
|
||||
|
||||
res = []
|
||||
if charter.chartered_group:
|
||||
if hasattr(charter, 'chartered_group'):
|
||||
for m in charter.chartered_group.groupmilestone_set.all():
|
||||
mh = find_history_active_at(m, just_before_next_rev)
|
||||
if mh and mh.state_id == need_state:
|
||||
|
|
Loading…
Reference in a new issue