Verify that item.by is not None before calling render_list_of_roles

This commit is contained in:
Benjamin Dauvergne 2011-11-06 16:24:21 +01:00 committed by Frédéric Péters
parent 5f9be5e8e3
commit 5b593c5e3a
1 changed files with 1 additions and 1 deletions

View File

@ -111,7 +111,7 @@ def graphviz(workflow, url_prefix='', select=None, svg=True,
url = 'status/%s/items/%s/' % (i, item.id)
if hasattr(item, 'label'):
label = item.label
if hasattr(item, 'by'):
if getattr(item, 'by', None):
roles = render_list_of_roles(item.by)
label += ' %s %s' % (_('by'), roles)
else: