I have recently upgraded to Django 3.1.5 and the code that I was using to find exact ManyToMany matches has stopped working. The code follows the tips of the answer to this