Fixed an issue where modifying a shared server incorrectly updated the original server details. #9258

This commit is contained in:
Pravesh Sharma authored and GitHub committed 2026-02-25 11:22:44 +05:30
1 parent 97c90f1e69
commit 5dd63ca16b
1 file changed
+4
@@ -39,6 +39,7 @@ from pgadmin.browser.server_groups.servers.utils import \
from pgadmin.utils.constants import UNAUTH_REQ, MIMETYPE_APP_JS, \
SERVER_CONNECTION_CLOSED, RESTRICTION_TYPE_SQL
from sqlalchemy import or_
from sqlalchemy.orm import object_session
from sqlalchemy.orm.attributes import flag_modified
from pgadmin.utils.preferences import Preferences
from .... import socketio as sio
@@ -1468,6 +1469,9 @@ class ServerNode(PGChildNodeView):
shared_server = None
if server.shared and server.user_id != current_user.id:
shared_server = ServerModule.get_shared_server(server, gid)
sess = object_session(server)
if sess is not None:
sess.expunge(server)
server = ServerModule.get_shared_server_properties(server,
shared_server)
if server is None: