1
0
mirror of https://github.com/django/django.git synced 2025-10-23 21:59:11 +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:
Anubhav Joshi
2014-06-03 09:06:59 +05:30
committed by Tim Graham
parent 7e2c87809c
commit 45e049937d
3 changed files with 44 additions and 3 deletions

View File

@@ -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)