Fixed 'No password supplied' error occurring on auto-detected servers.

This commit is contained in:
Aditya Toshniwal 2021-05-14 15:14:18 +05:30 committed by Akshay Joshi
parent c8a2057410
commit b7c0914f33
2 changed files with 3 additions and 2 deletions

View File

@ -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:

View File

@ -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):