mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fix an issue where the default server-group is being deleted if the load-server json file contains no servers. #6602
This commit is contained in:
committed by
GitHub
parent
fe753bd272
commit
e587ef404c
@@ -182,6 +182,10 @@ class ServerGroupView(NodeView):
|
||||
).order_by("id")
|
||||
|
||||
# if server group id is 1 we won't delete it.
|
||||
# This matches the behavior of
|
||||
# web/pgadmin/utils/__init.py__#clear_database_servers
|
||||
# called by the setup script when importing and replacing servers:
|
||||
# `python setup.py --load-servers input_file.json --replace`
|
||||
sg = groups.first()
|
||||
|
||||
shared_servers = Server.query.filter_by(servergroup_id=gid,
|
||||
|
||||
Reference in New Issue
Block a user