Skip to content

Commit

Permalink
Ensure connection retrieved by ID is of type ConnectionBase
Browse files Browse the repository at this point in the history
  • Loading branch information
khamitovdr committed Dec 24, 2024
1 parent 21be0d8 commit dee3ca5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/dl_core_testing/dl_core_testing/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ def make_saved_connection(
if conn_id is None:
raise ValueError("Connection ID is None")

return sync_usm.get_by_id(conn_id)
conn = sync_usm.get_by_id(conn_id)
assert isinstance(conn, ConnectionBase) # for typing
return conn


def make_saved_connection_from_db(
Expand Down

0 comments on commit dee3ca5

Please sign in to comment.