mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #13776 -- Fixed ModelForm.is_valid() exception with non-nullable FK and blank=True.
Thanks peterbe for the report.
This commit is contained in:
committed by
Tim Graham
parent
7e2c87809c
commit
45e049937d
@@ -401,3 +401,9 @@ class Character(models.Model):
|
||||
class StumpJoke(models.Model):
|
||||
most_recently_fooled = models.ForeignKey(Character, limit_choices_to=today_callable_dict, related_name="+")
|
||||
has_fooled_today = models.ManyToManyField(Character, limit_choices_to=today_callable_q, related_name="+")
|
||||
|
||||
|
||||
# Model for #13776
|
||||
class Student(models.Model):
|
||||
character = models.ForeignKey(Character)
|
||||
study = models.CharField(max_length=30)
|
||||
|
||||
Reference in New Issue
Block a user