mirror of https://github.com/jumpserver/jumpserver
perf: model_to_dict无法转换不可编辑字段,导致消息中有的值为None
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…
Reference in New Issue