﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
33084	Removed incorrect fields.W343 check and notes about limit_choices_to restrictions for ManyToManyField.	jhbuhrman	Hasan Ramezani	"The model setup given below:

{{{#!python
class Number(models.Model):
    value = models.IntegerField()

    def __str__(self) -> str:
        return f""{self.value}""


class NumbersToDiceThroughModel(models.Model):
    number = models.ForeignKey(""Number"", on_delete=models.PROTECT)
    die = models.ForeignKey(""Die"", on_delete=models.CASCADE)


class Die(models.Model):
    numbers = models.ManyToManyField(
        ""Number"",
        through=""NumbersToDiceThroughModel"",
        limit_choices_to=models.Q(value__gte=1),
    )
}}}

Results in a **correct** limitation of possible choices. But at the same time the following warning is issued:

{{{
... .Die.numbers: (fields.W343) limit_choices_to has no effect on ManyToManyField with a through model.
}}}"	Bug	closed	Database layer (models, ORM)	3.2	Normal	fixed	limit_choices_to	Carlton Gibson Simon Charette	Accepted	1	0	0	0	0	0
