perf: 修改 OPTION 获取字段 org_id label 为 Organization ID

pull/9244/head
Bai 2022-12-26 19:32:07 +08:00
parent 7f6d13a5a6
commit ed35ac2930
1 changed files with 3 additions and 0 deletions

View File

@ -8,6 +8,7 @@ from collections import OrderedDict
from django.core.exceptions import PermissionDenied
from django.http import Http404
from django.utils.encoding import force_text
from django.utils.translation import ugettext_lazy as _
from rest_framework import exceptions, serializers
from rest_framework.fields import empty
from rest_framework.metadata import SimpleMetadata
@ -125,6 +126,8 @@ class SimpleMetadataWithFilters(SimpleMetadata):
if field.field_name == 'id':
field_info['label'] = 'ID'
if field.field_name == 'org_id':
field_info['label'] = _('Organization ID')
return field_info