Don't show 'None' as label for nullable foreign key, closes #406

This commit is contained in:
Simon Willison 2019-11-02 15:29:40 -07:00
commit 14da70525b
4 changed files with 25 additions and 5 deletions

View file

@ -637,7 +637,7 @@ class TableView(RowTableShared):
new_row = CustomRow(columns)
for column in row.keys():
value = row[column]
if (column, value) in expanded_labels:
if (column, value) in expanded_labels and value is not None:
new_row[column] = {
"value": value,
"label": expanded_labels[(column, value)],