Fix: Always show the latest next hearing date in the compliance list

This commit is contained in:
Amritanshu Agrawal 2021-01-21 09:02:34 +05:30
parent 405230a32d
commit c70d074c32

View File

@ -54,7 +54,7 @@ def case_info(item: Case) -> List[schemas.ComplianceList]:
title=item.title, title=item.title,
proceedings=h.proceedings if h.proceedings is not None else "", proceedings=h.proceedings if h.proceedings is not None else "",
complianceDate=h.compliance_date, complianceDate=h.compliance_date,
nextHearingDate=h.next_hearing_date, nextHearingDate=item.hearings[0].next_hearing_date,
) )
for h in item.hearings for h in item.hearings
if h.compliance_date is not None and h.compliance_done is False if h.compliance_date is not None and h.compliance_done is False