summaryrefslogtreecommitdiff
path: root/tests/model_forms/models.py
diff options
context:
space:
mode:
authoralvinshaita <alvinshaita@gmail.com>2020-08-17 06:39:10 +0300
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2020-10-27 20:40:04 +0100
commit556fa4bbba5ba86bc1646a86fb11ab55405d4aa4 (patch)
treebabd318f44b7891df91bb748d8b2c9de50b5bbcf /tests/model_forms/models.py
parent36bc47069ce071e80c8129500de3b8664d2058a7 (diff)
Fixed #1891, Fixed #11707 -- Prevented duplicates with limit_choices_to on multi-value relations.
Diffstat (limited to 'tests/model_forms/models.py')
-rw-r--r--tests/model_forms/models.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/model_forms/models.py b/tests/model_forms/models.py
index 1a2102f898..4e9ed2b1e4 100644
--- a/tests/model_forms/models.py
+++ b/tests/model_forms/models.py
@@ -411,9 +411,14 @@ class StumpJoke(models.Model):
Character,
models.CASCADE,
limit_choices_to=today_callable_dict,
- related_name="+",
+ related_name='jokes',
)
- has_fooled_today = models.ManyToManyField(Character, limit_choices_to=today_callable_q, related_name="+")
+ has_fooled_today = models.ManyToManyField(
+ Character,
+ limit_choices_to=today_callable_q,
+ related_name='jokes_today',
+ )
+ funny = models.BooleanField(default=False)
# Model for #13776