Skip to content

Commit

Permalink
fixed updating
Browse files Browse the repository at this point in the history
  • Loading branch information
khoroshevskyi committed Feb 1, 2024
1 parent eeb7817 commit 7f91246
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
8 changes: 4 additions & 4 deletions pephub/routers/api/v1/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,10 +304,10 @@ async def update_a_pep(
# status_code=400,
# detail=f"Invalid update key: {k}",
# )
# add params to new_raw_project if update_dict is not empty
if len(update_dict) > 0:
for k, v in update_dict.items():
new_raw_project["_config"][k] = v
# # add params to new_raw_project if update_dict is not empty
# if len(update_dict) > 0:
# for k, v in update_dict.items():
# new_raw_project["_config"][k] = v
agent.project.update(
dict(project=Project().from_dict(new_raw_project), **update_dict),
namespace,
Expand Down
1 change: 0 additions & 1 deletion pephub/routers/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ class ProjectOptional(UpdateItems):
project_config_yaml: Optional[str] = None
description: Optional[str] = None
subsample_tables: Optional[List[List[dict]]] = None
pop: Optional[bool] = None

model_config = ConfigDict(populate_by_name=True)

Expand Down

0 comments on commit 7f91246

Please sign in to comment.