fix: shift fetching fails in Employee Checkin if shift assignment has an end date
Co-authored-by: Ejaaz Khan <ejaazrkhan@gmail.com>
This commit is contained in:
parent
143067f5a7
commit
98cccf221e
@ -251,7 +251,7 @@ def get_shifts_for_date(employee: str, for_timestamp: datetime) -> List[Dict[str
|
|||||||
Criterion.any(
|
Criterion.any(
|
||||||
[
|
[
|
||||||
assignment.end_date.isnull(),
|
assignment.end_date.isnull(),
|
||||||
(assignment.end_date.isnotnull() & (getdate(for_timestamp.date()) >= assignment.end_date)),
|
(assignment.end_date.isnotnull() & (getdate(for_timestamp.date()) <= assignment.end_date)),
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user