8000 fix: virtual connections username by jorwoods · Pull Request #1628 · tableau/server-client-python · GitHub
[go: up one dir, main page]

Skip to content

fix: virtual connections username #1628

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

8000
Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tableauserverclient/models/connection_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def from_response(cls, resp, ns) -> list["ConnectionItem"]:
connection_item.embed_password = string_to_bool(connection_xml.get("embedPassword", ""))
connection_item.server_address = connection_xml.get("serverAddress", connection_xml.get("server", None))
connection_item.server_port = connection_xml.get("serverPort", connection_xml.get("port", None))
connection_item.username = connection_xml.get("userName", None)
connection_item.username = connection_xml.get("userName", connection_xml.get("username", None))
connection_item._query_tagging = (
string_to_bool(s) if (s := connection_xml.get("queryTagging", None)) else None
)
Expand Down
2 changes: 1 addition & 1 deletion test/assets/virtual_connection_populate_connections.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<tsResponse xmlns="http://tableau.com/api" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://tableau.com/api http://tableau.com/api/ts-api-2.3.xsd">
<virtualConnectionConnections>
<connection id="37ca6ced-58d7-4dcf-99dc-f0a85223cbef" dbClass="postgres" serverAddress="localhost" userName="pgadmin" serverPort="5432"/>
<connection id="37ca6ced-58d7-4dcf-99dc-f0a85223cbef" dbClass="postgres" serverAddress="localhost" username="pgadmin" serverPort="5432"/>
</virtualConnectionConnections>
</tsResponse>
2 changes: 1 addition & 1 deletion test/assets/virtual_connection_populate_connections2.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<tsResponse xmlns="http://tableau.com/api" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://tableau.com/api http://tableau.com/api/ts-api-2.3.xsd">
<virtualConnectionConnections>
<connection connectionId="37ca6ced-58d7-4dcf-99dc-f0a85223cbef" dbClass="postgres" server="localhost" userName="pgadmin" port="5432"/>
<connection connectionId="37ca6ced-58d7-4dcf-99dc-f0a85223cbef" dbClass="postgres" server="localhost" username="pgadmin" port="5432"/>
</virtualConnectionConnections>
</tsResponse>
Loading
0