mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-07-18 17:01:31 +00:00
fix: 工单列表类型没有翻译
This commit is contained in:
parent
e18e019460
commit
9b2b71dddc
@ -39,9 +39,10 @@ class TicketSerializer(OrgResourceModelSerializerMixin):
|
|||||||
tp = self.fields.get('type')
|
tp = self.fields.get('type')
|
||||||
if not tp:
|
if not tp:
|
||||||
return
|
return
|
||||||
choices = tp.choices
|
excluded_value = TicketType.general
|
||||||
choices.pop(TicketType.general, None)
|
self.fields['type'].choices = [
|
||||||
tp.choices = choices
|
(value, label) for value, label in tp.choices.items() if value != excluded_value
|
||||||
|
]
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def setup_eager_loading(cls, queryset):
|
def setup_eager_loading(cls, queryset):
|
||||||
|
Loading…
Reference in New Issue
Block a user