Skip to content

Commit 0f13fed

Browse files
committed
Possibly fixed the auto translation of messages in auth, thanks Hadi
1 parent c0dff41 commit 0f13fed

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

py4web/utils/auth.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1068,7 +1068,10 @@ def enable(self, route="auth", uses=(), env=None, spa=False, allow_api_routes=Tr
10681068
T = translators[0]
10691069
for group in self.param.messages.values():
10701070
for key, value in group.items():
1071-
group[key] = T(value)
1071+
if isinstance(value, (list, tuple)):
1072+
group[key] = map(T, value)
1073+
else:
1074+
group[key] = T(value)
10721075

10731076
methods = ["GET", "POST", "OPTIONS"]
10741077

0 commit comments

Comments
 (0)