File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 11from __future__ import annotations
22
3- import collections
43import typing
54
65from core .const .tag import OpenAPITag
@@ -25,7 +24,7 @@ def get_json_schema(self) -> dict:
2524 result = {
2625 "schema" : serializer_class .get_json_schema (),
2726 "ui_schema" : {},
28- "translation_fields" : collections . defaultdict (),
27+ "translation_fields" : set (),
2928 }
3029
3130 nullable_fields = [
@@ -64,7 +63,9 @@ def get_json_schema(self) -> dict:
6463 result ["ui_schema" ][field .name ] = {"ui:field" : "file" }
6564 elif isinstance (field , TranslationField ):
6665 translated_field = field .translated_field
67- result ["translation_fields" ][field .name ] = translated_field .name
66+ result ["translation_fields" ].add (translated_field )
67+
68+ result ["translation_fields" ] = list (result ["translation_fields" ])
6869 return result
6970
7071 @utils .extend_schema (
You can’t perform that action at this time.
0 commit comments