wcs: render as empty string cells that don't have a category configured (#8211)
This commit is contained in:
parent
4834960e76
commit
df0a73a08e
|
@ -119,6 +119,8 @@ class WcsCategoryCell(WcsCommonCategoryCell):
|
|||
return WcsCategoryCellForm
|
||||
|
||||
def render(self, context):
|
||||
if not self.category_reference:
|
||||
return ''
|
||||
category_template = template.loader.get_template('combo/wcs/category.html')
|
||||
context['slug'] = self.category_reference.split(':')[-1]
|
||||
context['title'] = self.cached_title
|
||||
|
@ -264,6 +266,8 @@ class WcsFormsOfCategoryCell(WcsCommonCategoryCell, WcsBlurpMixin):
|
|||
return self.category_reference
|
||||
|
||||
def render(self, context):
|
||||
if not self.category_reference:
|
||||
return ''
|
||||
renderer = self.get_blurp_renderer(context)
|
||||
template = renderer.render_template()
|
||||
context = renderer.render(context)
|
||||
|
|
Loading…
Reference in New Issue