Skip to content

Commit

Permalink
fix time
Browse files Browse the repository at this point in the history
  • Loading branch information
ihfazhillah committed Jun 4, 2024
1 parent bb7fff5 commit cdf7d44
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ksatria_muslim/children_task/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,17 @@ def serialize_task(history: TaskHistory, request=None):
if request:
image_url = request.build_absolute_uri(image_url)

time = "Belum Terjadwal"
if history.task.scheduled_at:
time = history.task.scheduled_at.strftime("%H:%M")

return {
"id": history.id,
"title": history.task.title,
"status": history.status,
"image": image_url,
"udzur": history.udzur_reason,
"time": history.task.scheduled_at.strftime("%H:%M"),
"time": time,
"need_confirmation": history.task.need_verification,
"created": history.created
}
Expand Down

0 comments on commit cdf7d44

Please sign in to comment.