From 5cfe1e56bc82e3c6331f0b856ab38f8b1eb41dbd Mon Sep 17 00:00:00 2001 From: Gokulram A Date: Wed, 22 Nov 2023 00:30:49 +0530 Subject: [PATCH] Display just the date in the CSV output of facility capacity for the updated date column (#1719) Add modified date formatting to CSV output in FacilityCapacity model --- care/facility/models/facility.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/care/facility/models/facility.py b/care/facility/models/facility.py index 16f4f0f39f..a0e8222e4a 100644 --- a/care/facility/models/facility.py +++ b/care/facility/models/facility.py @@ -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 (