Fix handling of non-text field types.

This commit is contained in:
Georg Brandl 2010-07-27 17:58:01 +02:00
parent 4a400034d9
commit fb0e13e0ec

View File

@ -141,9 +141,12 @@ class TypedField(GroupedField):
par = nodes.paragraph()
par += self.make_xref(self.rolename, domain, fieldarg, nodes.strong)
if fieldarg in types:
typename = u''.join(n.astext() for n in types[fieldarg])
par += nodes.Text(' (')
par += self.make_xref(self.typerolename, domain, typename)
if len(fieldtype) == 1 and isinstance(fieldtype[0], nodes.Text):
typename = u''.join(n.astext() for n in types[fieldarg])
par += self.make_xref(self.typerolename, domain, typename)
else:
par += fieldtype
par += nodes.Text(')')
par += nodes.Text(' -- ')
par += content