Skip to content

Commit 444d400

Browse files
author
Phillip Simonds
committed
Revert change of async init function on InfrahubTransform.
We don't want a value passed into the function that isn't used, and likewise don't want to change the API for that init function.
1 parent d44a2af commit 444d400

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

infrahub_sdk/transforms.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,14 @@ async def init(cls, client: Optional[InfrahubClient] = None, *args: Any, **kwarg
5656
stacklevel=1,
5757
)
5858

59-
return cls(*args, **kwargs)
59+
item = cls(*args, **kwargs)
60+
61+
if client:
62+
item.client = client
63+
else:
64+
item.client = InfrahubClient(address=item.server_url)
65+
66+
return item
6067

6168
@property
6269
def branch_name(self) -> str:

0 commit comments

Comments
 (0)