1๐
โ
So the solution is to not use a linkColumn if some of your records are missing values for the agrs.
If you need to display information in django-tables2 where a column might or might not have infomation needed for a url link use
templateColumn
for example
templateRegister = tables.TemplateColumn(template_name="carmanager/registertemplate.html")
registertemplate.html should look like this
<a {% if record.register__id %} target="_Blank" href="/carmanager/register_docs/{{record.register__id}}"> View Register {%else%} > No register {%endif%}</a>
๐คuser1778743
Source:stackexchange.com