mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Revert the changes done for removing support for Python 3.7
This commit is contained in:
@@ -65,7 +65,13 @@ from pgadmin.authenticate import AuthSourceManager
|
||||
from pgadmin.utils.exception import CryptKeyMissing
|
||||
|
||||
from pgadmin.user_login_check import pga_login_required
|
||||
from flask_security.views import default_render_json
|
||||
|
||||
try:
|
||||
from flask_security.views import default_render_json
|
||||
except ImportError as e:
|
||||
# Support Flask-Security-Too == 3.2
|
||||
if sys.version_info < (3, 8):
|
||||
from flask_security.views import _render_json as default_render_json
|
||||
|
||||
MODULE_NAME = 'browser'
|
||||
BROWSER_STATIC = 'browser.static'
|
||||
@@ -1101,7 +1107,9 @@ if hasattr(config, 'SECURITY_RECOVERABLE') and config.SECURITY_RECOVERABLE:
|
||||
has_error = False
|
||||
form_class = _security.forms.get('reset_password_form').cls
|
||||
form = form_class(request.form) if request.form else form_class()
|
||||
form.user = user
|
||||
|
||||
if sys.version_info >= (3, 8):
|
||||
form.user = user
|
||||
|
||||
if form.validate_on_submit():
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user