diff --git a/tailbone/views/master.py b/tailbone/views/master.py index 1ab87bb6..1eb7686a 100644 --- a/tailbone/views/master.py +++ b/tailbone/views/master.py @@ -791,6 +791,14 @@ class MasterView(View): url = self.request.route_url('subdepartments.view', uuid=subdepartment.uuid) return tags.link_to(text, url) + def render_brand(self, obj, field): + brand = getattr(obj, field) + if not brand: + return + text = brand.name + url = self.request.route_url('brands.view', uuid=brand.uuid) + return tags.link_to(text, url) + def render_category(self, obj, field): category = getattr(obj, field) if not category: