Django ForeignKey Conditional Data Restriction

Job ID: 38646865

Budget: £10 – £20 GBP

I need a Django expert to help me restrict data selection in my admin interface based on a specific condition using ForeignKey.

Please take a look at the image attached.
As you can see I want to add a "Clock Out" instance but I want the list with names to only show those names that have a "Clock In" instance without a "Clock Out" pair. The system automatically creates a "Clock Out" for each "Clock In" instance but sometimes people forget to clock in or clock out and the admin must add either a clockin or a clockout. When the admin must add a clockout the list should only show those names that have a clockin but no clockout.
Please do not apply if you don't understand.
Related categories: Python Django