Skip to content

Commit ca3815e

Browse files
authored
fix: Create a blank document name with more than 128 characters, prompt message needs to be translated (#3825)
1 parent da9ed39 commit ca3815e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

apps/common/exception/handle_exception.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,10 @@ def find_err_detail(exc_detail):
6868
_label = get_label(key, exc_detail)
6969
_value = exc_detail[key]
7070
if isinstance(_value, list):
71-
return f"{_label}:{find_err_detail(_value)}"
71+
for v in _value:
72+
r = find_err_detail(ReturnDict({key: v}, serializer=exc_detail.serializer))
73+
if r is not None:
74+
return r
7275
if isinstance(_value, ErrorDetail):
7376
return f"{_label}:{find_err_detail(_value)}"
7477
if isinstance(_value, dict) and len(_value.keys()) > 0:
@@ -78,7 +81,7 @@ def find_err_detail(exc_detail):
7881
return _value
7982
if isinstance(exc_detail, list):
8083
for v in exc_detail:
81-
r = find_err_detail(v)
84+
r = find_err_detail(ReturnDict(v, serializer=exc_detail.serializer.child))
8285
if r is not None:
8386
return r
8487

0 commit comments

Comments
 (0)