Misc. tweaks to vendor catalog views
for sake of titeship
This commit is contained in:
parent
ee3d32d60a
commit
3cd5fa7f4a
3 changed files with 15 additions and 9 deletions
|
@ -928,7 +928,10 @@ class MasterView(View):
|
|||
vendor = getattr(obj, field)
|
||||
if not vendor:
|
||||
return ""
|
||||
text = "({}) {}".format(vendor.id, vendor.name)
|
||||
if vendor.id:
|
||||
text = "({}) {}".format(vendor.id, vendor.name)
|
||||
else:
|
||||
text = six.text_type(vendor)
|
||||
url = self.request.route_url('vendors.view', uuid=vendor.uuid)
|
||||
return tags.link_to(text, url)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue