Skip to content

Commit

Permalink
perf: model_to_dict无法转换不可编辑字段,导致消息中有的值为None
Browse files Browse the repository at this point in the history
  • Loading branch information
O-Jiangweidong authored and BaiJiangJie committed Dec 19, 2023
1 parent 2b41486 commit fda3e6e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions apps/tickets/notifications.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ def _get_fields_items(self, item_names):
field = fields[name]
item = {'name': name, 'title': field.verbose_name}
value = self.ticket.get_field_display(name, field, data)
if not value:
continue
item['value'] = value
items.append(item)
return items
Expand Down

0 comments on commit fda3e6e

Please sign in to comment.