Skip to content

Commit

Permalink
add correct check for validation ret value (#309)
Browse files Browse the repository at this point in the history
  • Loading branch information
mariostieriansys authored Sep 14, 2023
1 parent 6e1e212 commit 4c55698
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ansys/pyensight/core/utils/adr.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def connect_to_existing_adr_report(
self._ensight.core.nexus.ReportServer.get_server().set_URL(url)
self._ensight.core.nexus.ReportServer.get_server().set_username(username)
self._ensight.core.nexus.ReportServer.get_server().set_password(password)
ret = self._ensight.core.nexus.ReportServer.get_server().validate()
ret = self._ensight.core.nexus.ReportServer.get_server().validate() == 1.0
else:
self._ensight._session.cmd(
f"ensight.core.nexus.ReportServer.get_server().set_URL('{url}')"
Expand All @@ -63,7 +63,7 @@ def connect_to_existing_adr_report(
f"ensight.core.nexus.ReportServer.get_server().set_password('{password}')"
)
ret = self._ensight._session.cmd(
"ensight.core.nexus.ReportServer.get_server().validate()"
"ensight.core.nexus.ReportServer.get_server().validate() == 1.0"
)
if ret is True:
self._adr_report_connected = True
Expand Down

0 comments on commit 4c55698

Please sign in to comment.