Fix consultant sort in engagement detail
This commit is contained in:
@@ -381,7 +381,7 @@ def get_linked_consultants_for_engagement(db: Session, *, engagement: ClientServ
|
|||||||
or_(ClientConsultantLink.effective_from.is_(None), ClientConsultantLink.effective_from <= today),
|
or_(ClientConsultantLink.effective_from.is_(None), ClientConsultantLink.effective_from <= today),
|
||||||
or_(ClientConsultantLink.effective_to.is_(None), ClientConsultantLink.effective_to >= today),
|
or_(ClientConsultantLink.effective_to.is_(None), ClientConsultantLink.effective_to >= today),
|
||||||
)
|
)
|
||||||
.order_by(ClientConsultantLink.is_primary.desc(), ConsultantProfile.full_name.asc())
|
.order_by(ClientConsultantLink.is_primary.desc(), ConsultantProfile.contact_person.asc())
|
||||||
).all()
|
).all()
|
||||||
return [{"link": link, "consultant": consultant} for link, consultant in rows]
|
return [{"link": link, "consultant": consultant} for link, consultant in rows]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user