Skip to content

Commit 707b006

Browse files
committed
Added a guard against trying to fetch milestones for a group value of None.
- Legacy-Id: 12988
1 parent e48b5c9 commit 707b006

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

ietf/doc/utils_charter.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,11 @@ def historic_milestones_for_charter(charter, rev):
126126
just_before_next_rev = datetime.datetime.now()
127127

128128
res = []
129-
for m in charter.chartered_group.groupmilestone_set.all():
130-
mh = find_history_active_at(m, just_before_next_rev)
131-
if mh and mh.state_id == need_state:
132-
res.append(mh)
129+
if charter.chartered_group:
130+
for m in charter.chartered_group.groupmilestone_set.all():
131+
mh = find_history_active_at(m, just_before_next_rev)
132+
if mh and mh.state_id == need_state:
133+
res.append(mh)
133134

134135
return res
135136

0 commit comments

Comments
 (0)