misc: only use strings when recreating user label (#36781)

This commit is contained in:
Frédéric Péters 2019-10-08 14:18:30 +02:00
parent 160db73192
commit cf9a14411f
1 changed files with 2 additions and 1 deletions

View File

@ -406,7 +406,8 @@ class FormData(StorableObject):
continue
if field.prefill and field.prefill.get('type') == 'user':
form_user_data[field.prefill['value']] = self.data.get(field.id)
user_label = ' '.join([form_user_data.get(x) for x in field_name_values if form_user_data.get(x)])
user_label = ' '.join([form_user_data.get(x) for x in field_name_values
if isinstance(form_user_data.get(x), basestring)])
if user_label != self.user_label:
self.user_label = user_label
changed = True