pref: 修改删掉 connection token type

pull/8991/head
ibuler 2022-10-26 17:56:37 +08:00
parent 8f88b898d0
commit 1239247b5a
4 changed files with 7 additions and 20 deletions

View File

@ -210,7 +210,7 @@ class ConnectionTokenMixin:
class ConnectionTokenViewSet(ConnectionTokenMixin, RootOrgViewMixin, JMSModelViewSet):
filterset_fields = (
'type', 'user_display', 'asset_display'
'user_display', 'asset_display'
)
search_fields = filterset_fields
serializer_classes = {

View File

@ -49,5 +49,9 @@ class Migration(migrations.Migration):
migrations.RemoveField(
model_name='connectiontoken',
name='system_user',
)
),
migrations.RemoveField(
model_name='connectiontoken',
name='type',
),
]

View File

@ -1,17 +0,0 @@
# Generated by Django 3.2.14 on 2022-10-26 08:07
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('authentication', '0012_auto_20220816_1629'),
]
operations = [
migrations.RemoveField(
model_name='connectiontoken',
name='type',
),
]

View File

@ -23,7 +23,7 @@ class ConnectionTokenSerializer(OrgResourceModelSerializerMixin):
class Meta:
model = ConnectionToken
fields_mini = ['id', 'type']
fields_mini = ['id']
fields_small = fields_mini + [
'secret', 'date_expired', 'date_created', 'date_updated',
'created_by', 'updated_by', 'org_id', 'org_name',