Fix grid link logic some more...
should not show link if value is None
This commit is contained in:
parent
40c7e34014
commit
60334229d5
|
@ -1052,7 +1052,8 @@ class CustomWebhelpersGrid(webhelpers2_grid.Grid):
|
|||
if hasattr(record, 'uuid'):
|
||||
attrs['data_uuid'] = record.uuid
|
||||
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 is not None and value != ''):
|
||||
url = self.url_generator(record, i)
|
||||
value = tags.link_to(value, url)
|
||||
class_name = 'c{} {}'.format(column_number, column_name)
|
||||
|
|
Loading…
Reference in a new issue