Misc. tweaks to vendor catalog views

for sake of titeship
This commit is contained in:
Lance Edgar 2020-10-23 22:08:43 -05:00
parent ee3d32d60a
commit 3cd5fa7f4a
3 changed files with 15 additions and 9 deletions

View file

@ -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)