In workflow visualisation, replace render_as_line() by label when possible
This commit is contained in:
parent
876a95b893
commit
71ae10bdd7
|
@ -109,7 +109,8 @@ def graphviz(workflow, url_prefix='', select=None, svg=True,
|
|||
next_id = status.id
|
||||
print >>out, 'status%s -> status%s' % (i, next_id)
|
||||
url = 'status/%s/items/%s/' % (i, item.id)
|
||||
label = textwrap.fill(item.render_as_line().replace('"', '\\"'), 20)
|
||||
label = getattr(item, 'label', False) or item.render_as_line()
|
||||
label = textwrap.fill(label.replace('"', '\\"'), 20)
|
||||
label = label.replace('\n', '\\n')
|
||||
print >>out, '[label="%s"' % label,
|
||||
if select == '%s-%s' % (i, item.id):
|
||||
|
|
Loading…
Reference in New Issue