From b7c0914f3397bd24a45dc3072ca7b2aeba1eac75 Mon Sep 17 00:00:00 2001 From: Aditya Toshniwal Date: Fri, 14 May 2021 15:14:18 +0530 Subject: [PATCH] Fixed 'No password supplied' error occurring on auto-detected servers. --- web/pgadmin/browser/server_groups/servers/__init__.py | 3 ++- web/pgadmin/model/__init__.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/web/pgadmin/browser/server_groups/servers/__init__.py b/web/pgadmin/browser/server_groups/servers/__init__.py index 0d32bf4d3..f4165c32d 100644 --- a/web/pgadmin/browser/server_groups/servers/__init__.py +++ b/web/pgadmin/browser/server_groups/servers/__init__.py @@ -1362,7 +1362,8 @@ class ServerNode(PGChildNodeView): except Exception as e: current_app.logger.exception(e) return internal_server_error(errormsg=str(e)) - if 'password' not in data and server.kerberos_conn is False: + if 'password' not in data and (server.kerberos_conn is False or + server.kerberos_conn is None): conn_passwd = getattr(conn, 'password', None) if conn_passwd is None and not server.save_password and \ server.passfile is None and server.service is None: diff --git a/web/pgadmin/model/__init__.py b/web/pgadmin/model/__init__.py index edfa7a49f..bd90077b7 100644 --- a/web/pgadmin/model/__init__.py +++ b/web/pgadmin/model/__init__.py @@ -184,7 +184,7 @@ class Server(db.Model): tunnel_identity_file = db.Column(db.String(64), nullable=True) tunnel_password = db.Column(db.String(64), nullable=True) shared = db.Column(db.Boolean(), nullable=False) - kerberos_conn = db.Column(db.Boolean(), nullable=False) + kerberos_conn = db.Column(db.Boolean(), nullable=False, default=0) @property def serialize(self):