Skip to content

Commit a728468

Browse files
committed
Fix some problems highlighted by the tests, making the code a bit more
robust in case of unexpected data - Legacy-Id: 6402
1 parent bb952fa commit a728468

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

ietf/doc/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ def area_acronym(self):
306306
if g:
307307
if g.type_id == "area":
308308
return g.acronym
309-
elif g.type_id != "individ":
309+
elif g.type_id != "individ" and g.parent:
310310
return g.parent.acronym
311311
else:
312312
return None

ietf/iesg/views.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858

5959
from ietf.doc.utils import update_telechat
6060
from ietf.ietfauth.utils import has_role, role_required
61-
from ietf.iesg.agenda import get_agenda_date, agenda_data, agenda_docs, agenda_wg_actions, agenda_management_issues
61+
from ietf.iesg.agenda import *
6262

6363
def review_decisions(request, year=None):
6464
events = DocEvent.objects.filter(type__in=("iesg_disapproved", "iesg_approved"))
@@ -212,7 +212,7 @@ def agenda_json(request, date=None):
212212
'rev': doc.rev,
213213
'wgname': doc.group.name,
214214
'acronym': doc.group.acronym,
215-
'ad': doc.group.ad.name}
215+
'ad': doc.group.ad.name if doc.group.ad else None}
216216
data['sections'][s]['wgs'] += [wginfo, ]
217217

218218
mgmt = agenda_management_issues(date)

0 commit comments

Comments
 (0)