Show grid link even when value is "false-ish"
saw a value of '0' get rendered with no link; this fixes
This commit is contained in:
parent
75bea75dce
commit
40c7e34014
|
@ -1052,7 +1052,7 @@ class CustomWebhelpersGrid(webhelpers2_grid.Grid):
|
||||||
if hasattr(record, 'uuid'):
|
if hasattr(record, 'uuid'):
|
||||||
attrs['data_uuid'] = record.uuid
|
attrs['data_uuid'] = record.uuid
|
||||||
return HTML.tag('li', tags.link_to(value, url), **attrs)
|
return HTML.tag('li', tags.link_to(value, url), **attrs)
|
||||||
if self.linked_columns and column_name in self.linked_columns and value:
|
if self.linked_columns and column_name in self.linked_columns and value != '':
|
||||||
url = self.url_generator(record, i)
|
url = self.url_generator(record, i)
|
||||||
value = tags.link_to(value, url)
|
value = tags.link_to(value, url)
|
||||||
class_name = 'c{} {}'.format(column_number, column_name)
|
class_name = 'c{} {}'.format(column_number, column_name)
|
||||||
|
|
Loading…
Reference in a new issue