def check_for_duplicate_assignments(participant):
participants = models.Participant.query.filter_by(<EOL>assignment_id=participant.assignment_id<EOL>).all()<EOL>duplicates = [<EOL>p for p in participants if (p.id != participant.id and p.status == "<STR_LIT>")<EOL>]<EOL>for d in duplicates:<EOL><INDENT>q.enqueue(worker_function, "<STR_LIT>", None, d.id)<EOL><DEDENT>
Check that the assignment_id of the participant is unique.

    If it isnt the older participants will be failed.