workflows: fix import on missing button label (#3215)

This commit is contained in:
Frédéric Péters 2013-07-05 15:27:53 +02:00
parent c28ab38609
commit c5ca23d118
1 changed files with 1 additions and 1 deletions

View File

@ -860,7 +860,7 @@ class CommentableWorkflowStatusItem(WorkflowStatusItem):
raise AssertionError('unknown type for button_label (%r)' % self.button_label)
def button_label_init_with_xml(self, element, charset):
if element is None:
if element is None or element.text is None:
return
self.button_label = element.text.encode(charset)