Skip to content

Commit

Permalink
Display just the date in the CSV output of facility capacity for the …
Browse files Browse the repository at this point in the history
…updated date column (#1719)

Add modified date formatting to CSV output in
FacilityCapacity model
  • Loading branch information
GokulramGHV authored Nov 21, 2023
1 parent e9cd2e6 commit 5cfe1e5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion care/facility/models/facility.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,10 @@ class Meta:
"facilitycapacity__modified_date": "Updated Date",
}

CSV_MAKE_PRETTY = {"facilitycapacity__room_type": (lambda x: REVERSE_ROOM_TYPES[x])}
CSV_MAKE_PRETTY = {
"facilitycapacity__room_type": (lambda x: REVERSE_ROOM_TYPES[x]),
"facilitycapacity__modified_date": (lambda x: x.strftime("%d-%m-%Y")),
}

def __str__(self):
return (
Expand Down

0 comments on commit 5cfe1e5

Please sign in to comment.