[Fixed]-Django .filter (or any other manager function) to check if item is present in ManyToMany field

1👍

Try:

helmets = self.helmet_set.filter(possessors=user)

Here you will find the relevant documentation for M2M relationships

👤Gocht

Leave a comment