Skip to content

Commit

Permalink
Refactor handling None connection ID in make_saved_connection function
Browse files Browse the repository at this point in the history
  • Loading branch information
khamitovdr committed Dec 24, 2024
1 parent 9298b8b commit 18e9fc8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/dl_core_testing/dl_core_testing/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@ def make_saved_connection(
conn = make_connection(us_manager=sync_usm, conn_type=conn_type, conn_name=conn_name, data_dict=data_dict)
sync_usm.save(conn)
conn_id = conn.uuid
if isinstance(conn_id, str):
return sync_usm.get_by_id(conn_id)
if conn_id is None:
raise ValueError("Connection ID is None")

raise ValueError(f"Unexpected conn_id type: {type(conn_id)}")
return sync_usm.get_by_id(conn_id)


def make_saved_connection_from_db(
Expand Down

0 comments on commit 18e9fc8

Please sign in to comment.