diff options
| author | Hasan Ramezani <hasan.r67@gmail.com> | 2020-02-02 17:30:34 +0100 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2020-02-05 10:27:01 +0100 |
| commit | da79ee472d803963dc3ea81ee67767dc06068aac (patch) | |
| tree | 6c8ad56c7820dc1fc46cea16fc6250b96d111360 /tests/model_forms/models.py | |
| parent | 1d5fb35e6a23c0670f3a128802a1776c8c7deaa8 (diff) | |
Fixed #26813 -- Prevented empty choice in ModelChoiceField with RadioSelect for fields with blank=False.
Diffstat (limited to 'tests/model_forms/models.py')
| -rw-r--r-- | tests/model_forms/models.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/model_forms/models.py b/tests/model_forms/models.py index 5a80243574..05c6d71a4a 100644 --- a/tests/model_forms/models.py +++ b/tests/model_forms/models.py @@ -393,6 +393,9 @@ class Character(models.Model): username = models.CharField(max_length=100) last_action = models.DateTimeField() + def __str__(self): + return self.username + class StumpJoke(models.Model): most_recently_fooled = models.ForeignKey( |
