Skip to content

Commit

Permalink
fix: backwards compatibility of NWMRequest
Browse files Browse the repository at this point in the history
  • Loading branch information
aaraney authored and christophertubbs committed Jan 30, 2024
1 parent 156c2f7 commit 0c71143
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,14 @@ def __init__(
super().__init__(**data)
else:
data["request_body"] = dict()
nwm_inner_request_body = {"config_data_id": config_data_id}
data["request_body"]["nwm"] = nwm_inner_request_body
if "model" in data:
nwm_inner_request_body = data["model"][self.get_model_name()]
if config_data_id is not None:
nwm_inner_request_body["config_data_id"] = config_data_id
data["request_body"][self.get_model_name()] = nwm_inner_request_body
else:
data["request_body"][self.get_model_name()] = {"config_data_id": config_data_id}

super().__init__(**data)

@classmethod
Expand Down

0 comments on commit 0c71143

Please sign in to comment.