Skip to content

Commit

Permalink
Merge pull request #174 from GoogleCloudPlatform/bug/update_test_quic…
Browse files Browse the repository at this point in the history
…kfix

Pass the correct parameter to _update_kwargs
  • Loading branch information
kmaphoenix authored Feb 20, 2024
2 parents 529cbab + 6c6d868 commit 37a4152
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/dfcx_scrapi/core/environments.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,10 +309,10 @@ def update_environment(
if environment_obj:
env = environment_obj
env.name = environment_id
mask = self._update_kwargs(environment_obj)
mask = self._update_kwargs(env)
elif kwargs:
env = self.get_environment(environment_id)
mask = self._update_kwargs(environment_obj, **kwargs)
mask = self._update_kwargs(env, **kwargs)

request = types.environment.UpdateEnvironmentRequest(
environment=env, update_mask=mask)
Expand Down
4 changes: 2 additions & 2 deletions src/dfcx_scrapi/core/test_cases.py
Original file line number Diff line number Diff line change
Expand Up @@ -462,12 +462,12 @@ def update_test_case(
if obj:
test_case = obj
test_case.name = test_case_id
mask = self._update_kwargs(obj)
mask = self._update_kwargs(test_case)
elif kwargs:
if not test_case_id:
test_case_id = self.test_case_id
test_case = self.get_test_case(test_case_id)
mask = self._update_kwargs(obj, **kwargs)
mask = self._update_kwargs(test_case, **kwargs)

request = types.test_case.UpdateTestCaseRequest(
test_case=test_case, update_mask=mask)
Expand Down

0 comments on commit 37a4152

Please sign in to comment.