Fix some problems highlighted by the tests, making the code a bit more

robust in case of unexpected data
 - Legacy-Id: 6402
This commit is contained in:
Ole Laursen 2013-10-09 16:28:36 +00:00
parent bb952fa281
commit a728468711
2 changed files with 3 additions and 3 deletions

View file

@ -306,7 +306,7 @@ class Document(DocumentInfo):
if g:
if g.type_id == "area":
return g.acronym
elif g.type_id != "individ":
elif g.type_id != "individ" and g.parent:
return g.parent.acronym
else:
return None

View file

@ -58,7 +58,7 @@ from ietf.person.models import Person
from ietf.doc.utils import update_telechat
from ietf.ietfauth.utils import has_role, role_required
from ietf.iesg.agenda import get_agenda_date, agenda_data, agenda_docs, agenda_wg_actions, agenda_management_issues
from ietf.iesg.agenda import *
def review_decisions(request, year=None):
events = DocEvent.objects.filter(type__in=("iesg_disapproved", "iesg_approved"))
@ -212,7 +212,7 @@ def agenda_json(request, date=None):
'rev': doc.rev,
'wgname': doc.group.name,
'acronym': doc.group.acronym,
'ad': doc.group.ad.name}
'ad': doc.group.ad.name if doc.group.ad else None}
data['sections'][s]['wgs'] += [wginfo, ]
mgmt = agenda_management_issues(date)