[Answered ]-Django: How to check if user has already voted on ManyToManyField?

0👍

Can you try this:

punch.voters.filter(pk=request.user.pk)

You can also replace the filter with a try-expect wrapped get

2👍

Many-to-many relationships can be queried using lookups across relationships.

Leave a comment