perf: model_to_dict无法转换不可编辑字段,导致消息中有的值为None

pull/12376/head
jiangweidong 11 months ago committed by Bryan
parent 2b41486f2a
commit fda3e6ec9b

@ -75,6 +75,8 @@ class BaseTicketMessage(UserMessage):
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

Loading…
Cancel
Save