Skip to content

Commit 96d021b

Browse files
committed
Fix branch handling in _run_transform and execute_graphql_query functions
1 parent 71c150d commit 96d021b

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

infrahub_sdk/ctl/cli_commands.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,6 @@ async def _run_transform(
208208
debug: Prints debug info to the command line
209209
repository_config: Repository config object. This is used to load the graphql query from the repository.
210210
"""
211-
branch = get_branch(branch)
212211

213212
try:
214213
response = execute_graphql_query(

infrahub_sdk/ctl/utils.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,10 @@ def execute_graphql_query(
118118
query_str = query_object.load_query()
119119

120120
client = initialize_client_sync()
121+
122+
if not branch:
123+
branch = client.config.default_infrahub_branch
124+
121125
response = client.execute_graphql(
122126
query=query_str,
123127
branch_name=branch,

0 commit comments

Comments
 (0)