Skip to content

Commit

Permalink
[#192] Use user fullnam on updated_by
Browse files Browse the repository at this point in the history
  • Loading branch information
wayangalihpratama committed Jan 7, 2024
1 parent 8f96bc7 commit 7683959
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion backend/models/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ def to_case_detail(self) -> CaseDetailDict:
"logo": self.logo,
"created_by": self.created_by_user.email,
"created_at": self.created_at.strftime("%Y-%m-%d %H:%M:%S"),
"updated_by": self.updated_by_user.email
"updated_by": self.updated_by_user.fullname
if self.updated_by
else None,
"updated_at": self.updated_at.strftime("%Y-%m-%d %H:%M:%S"),
Expand Down
2 changes: 1 addition & 1 deletion backend/tests/test_020_case.py
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ async def test_get_case_by_id_without_segments(
"multiple_commodities": False,
"created_by": "super_admin@akvo.org",
"created_at": res["created_at"],
"updated_by": "super_admin@akvo.org",
"updated_by": "John Doe",
"updated_at": res["updated_at"],
"segments": [],
"case_commodities": [
Expand Down
2 changes: 1 addition & 1 deletion backend/tests/test_051_segment_answer_continued.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ async def test_get_case_by_id_with_segments(
"multiple_commodities": False,
"created_by": "super_admin@akvo.org",
"created_at": res["created_at"],
"updated_by": "super_admin@akvo.org",
"updated_by": "John Doe",
"updated_at": res["updated_at"],
"segments": [
{
Expand Down

0 comments on commit 7683959

Please # to comment.