Fixed UnboundLocalError where local variable 'user_id' referenced before assignment. Fixes #6671

This commit is contained in:
Akshay Joshi committed 2021-08-19 15:06:16 +05:30
1 parent 7798584e1c
commit 3f3416c13e
2 files changed
+2

No files matched your search

+1
View File
@@ -305,6 +305,7 @@ def create_app(app_name=None):
language = 'en'
if config.SERVER_MODE is False:
# Get the user language preference from the miscellaneous module
user_id = None
if current_user.is_authenticated:
user_id = current_user.id
else: