Skip to content

Commit

Permalink
[#192] Fix case update by when click Next button
Browse files Browse the repository at this point in the history
  • Loading branch information
wayangalihpratama committed Jan 8, 2024
1 parent 211b26c commit f55da27
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions backend/routes/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ def get_case_options(

@case_route.put(
"/case/{case_id:path}",
response_model=CaseDict,
response_model=CaseDetailDict,
summary="update case by id",
name="case:update",
tags=["Case"],
Expand All @@ -195,7 +195,7 @@ def update_Case(
case = crud_case.case_updated_by(
session=session, case_id=case_id, user_id=user.id
)
return case.serialize
return case.to_case_detail


@case_route.get(
Expand Down
6 changes: 4 additions & 2 deletions backend/tests/test_020_case.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,8 +344,10 @@ async def test_update_case(
"segmentation": False,
"living_income_study": "living_income",
"multiple_commodities": False,
"logo": None,
"created_by": 1,
"created_by": "super_admin@akvo.org",
"created_at": res["created_at"],
"updated_by": "John Doe",
"updated_at": res["updated_at"],
"case_commodities": [
{
"id": 1,
Expand Down

0 comments on commit f55da27

Please # to comment.