form: do not fail on removed user

This commit is contained in:
Frédéric Péters 2013-05-02 11:32:18 +02:00
parent ae56ea05e0
commit ef88691226
1 changed files with 4 additions and 2 deletions

View File

@ -545,8 +545,10 @@ class FormDef(StorableObject):
else:
evo_who = evo.who
if evo_who:
details.append(_('User name'))
details.append(' %s' % get_publisher().user_class.get(evo_who).name)
user_who = get_publisher().user_class.get(evo_who, ignore_errors=True)
if user_who:
details.append(_('User name'))
details.append(' %s' % user_who.name)
if evo.status:
details.append(_('Status'))
details.append(' %s' % formdata.get_status_label())