Skip to content

Commit

Permalink
Merge branch 'main' into v0.7.1
Browse files Browse the repository at this point in the history
  • Loading branch information
DirkEilander committed Apr 14, 2023
2 parents 8fdb56a + eb132c8 commit 1ba94ce
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions hydromt/models/model_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,12 +199,14 @@ def build(
if self._CLI_ARGS["region"] not in opt:
opt = {self._CLI_ARGS["region"]: {}, **opt}
opt[self._CLI_ARGS["region"]].update(region=region)

# then loop over other methods
for method in opt:
# if any write_* functions are present in opt, skip the final self.write() call
if method.startswith("write_"):
write = False
self._run_log_method(method, **opt[method])
kwargs = {} if opt[method] is None else opt[method]
self._run_log_method(method, **kwargs)

# write
if write:
Expand Down Expand Up @@ -275,7 +277,8 @@ def update(
# if any write_* functions are present in opt, skip the final self.write() call
if method.startswith("write_"):
write = False
self._run_log_method(method, **opt[method])
kwargs = {} if opt[method] is None else opt[method]
self._run_log_method(method, **kwargs)

# write
if write:
Expand Down

0 comments on commit 1ba94ce

Please sign in to comment.