Browse Source

fix: 工单列表类型没有翻译

pull/12379/head^2
wangruidong 11 months ago committed by Bryan
parent
commit
9b2b71dddc
  1. 7
      apps/tickets/serializers/ticket/ticket.py

7
apps/tickets/serializers/ticket/ticket.py

@ -39,9 +39,10 @@ class TicketSerializer(OrgResourceModelSerializerMixin):
tp = self.fields.get('type')
if not tp:
return
choices = tp.choices
choices.pop(TicketType.general, None)
tp.choices = choices
excluded_value = TicketType.general
self.fields['type'].choices = [
(value, label) for value, label in tp.choices.items() if value != excluded_value
]
@classmethod
def setup_eager_loading(cls, queryset):

Loading…
Cancel
Save