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

This commit is contained in:
Akshay Joshi 2021-08-19 15:06:16 +05:30
parent 7798584e1c
commit 3f3416c13e
2 changed files with 2 additions and 0 deletions

View File

@ -20,3 +20,4 @@ Bug fixes
| `Issue #6564 <https://redmine.postgresql.org/issues/6564>`_ - Fixed an issue where columns with sequences get altered unnecessarily with a schema diff tool.
| `Issue #6572 <https://redmine.postgresql.org/issues/6572>`_ - Partially fixes the data output panel display issue.
| `Issue #6671 <https://redmine.postgresql.org/issues/6671>`_ - Fixed UnboundLocalError where local variable 'user_id' referenced before assignment.

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: