mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fix an issue where importing servers fails if a group already exists for a different user. Fixes #4022
This commit is contained in:
parent
98283c1213
commit
73b144c45c
@ -35,4 +35,5 @@ Bug fixes
|
|||||||
| `Bug #3974 <https://redmine.postgresql.org/issues/3974>`_ - Fix alignment of Connection type toggle switch of pgagent.
|
| `Bug #3974 <https://redmine.postgresql.org/issues/3974>`_ - Fix alignment of Connection type toggle switch of pgagent.
|
||||||
| `Bug #3981 <https://redmine.postgresql.org/issues/3981>`_ - Fix the query to set bytea_output so that read-only standbys don't consider it a write query.
|
| `Bug #3981 <https://redmine.postgresql.org/issues/3981>`_ - Fix the query to set bytea_output so that read-only standbys don't consider it a write query.
|
||||||
| `Bug #3985 <https://redmine.postgresql.org/issues/3985>`_ - Don't embed docs and external sites in iframes, to allow the external sites to set X-FRAME-OPTIONS = DENY for security.
|
| `Bug #3985 <https://redmine.postgresql.org/issues/3985>`_ - Don't embed docs and external sites in iframes, to allow the external sites to set X-FRAME-OPTIONS = DENY for security.
|
||||||
| `Bug #4021 <https://redmine.postgresql.org/issues/4021>`_ - Disable the editor and execute functions whilst queries are executing.
|
| `Bug #4021 <https://redmine.postgresql.org/issues/4021>`_ - Disable the editor and execute functions whilst queries are executing.
|
||||||
|
| `Bug #4022 <https://redmine.postgresql.org/issues/4022>`_ - Fix an issue where importing servers fails if a group already exists for a different user.
|
@ -190,8 +190,8 @@ def load_servers(args):
|
|||||||
groups_added = 0
|
groups_added = 0
|
||||||
servers_added = 0
|
servers_added = 0
|
||||||
|
|
||||||
# Get the server group
|
# Get the server groups
|
||||||
groups = ServerGroup.query.all()
|
groups = ServerGroup.query.filter_by(user_id=user_id)
|
||||||
|
|
||||||
def print_summary():
|
def print_summary():
|
||||||
print("Added %d Server Group(s) and %d Server(s)." %
|
print("Added %d Server Group(s) and %d Server(s)." %
|
||||||
@ -251,7 +251,7 @@ def load_servers(args):
|
|||||||
|
|
||||||
group_id = new_group.id
|
group_id = new_group.id
|
||||||
groups_added = groups_added + 1
|
groups_added = groups_added + 1
|
||||||
groups = ServerGroup.query.all()
|
groups = ServerGroup.query.filter_by(user_id=user_id)
|
||||||
|
|
||||||
# Create the server
|
# Create the server
|
||||||
new_server = Server()
|
new_server = Server()
|
||||||
|
Loading…
Reference in New Issue
Block a user