🥅 Don't send None to Locale.parse
The latest version of Babel no longer supports this but raises an error, which in turn leads to a 500 Server Error response here. To fix this, we set a default for best_match. Closes #4744
This commit is contained in:
1 parent
588a1c4cc8
commit
59054cc1e5
1 file changed
+1
-1
@@ -1349,7 +1349,7 @@ class Server:
|
||||
):
|
||||
return Locale.negotiate([default_language], LANGUAGES)
|
||||
|
||||
return Locale.parse(request.accept_languages.best_match(LANGUAGES))
|
||||
return Locale.parse(request.accept_languages.best_match(LANGUAGES, default="en"))
|
||||
|
||||
def _setup_heartbeat_logging(self):
|
||||
logger = logging.getLogger(__name__ + ".heartbeat")
|
||||
|
||||
Reference in new issue
Block a user