mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Fixed #33084 -- Removed incorrect system check for ManyToManyField with limit_choices_to.
This commit is contained in:
committed by
Mariusz Felisiak
parent
46c8df640c
commit
0a28b42b15
@@ -480,3 +480,20 @@ class NullableUniqueCharFieldModel(models.Model):
|
||||
email = models.EmailField(blank=True, null=True)
|
||||
slug = models.SlugField(blank=True, null=True)
|
||||
url = models.URLField(blank=True, null=True)
|
||||
|
||||
|
||||
class Number(models.Model):
|
||||
value = models.IntegerField()
|
||||
|
||||
|
||||
class NumbersToDice(models.Model):
|
||||
number = models.ForeignKey('Number', on_delete=models.CASCADE)
|
||||
die = models.ForeignKey('Dice', on_delete=models.CASCADE)
|
||||
|
||||
|
||||
class Dice(models.Model):
|
||||
numbers = models.ManyToManyField(
|
||||
Number,
|
||||
through=NumbersToDice,
|
||||
limit_choices_to=models.Q(value__gte=1),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user