Skip to content

Commit

Permalink
fix: make sure transformer property on version endpoint is not undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
khorshuheng committed Jan 25, 2024
1 parent 9dfff73 commit 533706d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions python/sdk/merlin/endpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ def __init__(self, endpoint: client.VersionEndpoint, log_url: str = None):
)

env_vars: Dict[str, str] = {}
self._transformer: Optional[Transformer] = None
if transformer.env_vars is not None:
for env_var in transformer.env_vars:
if env_var.name is not None and env_var.value is not None:
Expand All @@ -97,7 +98,7 @@ def __init__(self, endpoint: client.VersionEndpoint, log_url: str = None):
resource_request=transformer_request,
env_vars=env_vars,
)

if log_url is not None:
self._log_url = log_url

Expand Down Expand Up @@ -157,7 +158,7 @@ def resource_request(self) -> Optional[ResourceRequest]:
return self._resource_request

@property
def transformer(self) -> Transformer:
def transformer(self) -> Optional[Transformer]:
return self._transformer

@property
Expand Down

0 comments on commit 533706d

Please sign in to comment.