mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
Fixed #12420. Now that OneToOneField allows assignment of None, stop guarding against it in ModelForms. Thanks, andrewsk.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12545 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -47,3 +47,10 @@ class RealPerson(models.Model):
|
||||
if self.name.lower() == 'anonymous':
|
||||
raise ValidationError("Please specify a real name.")
|
||||
|
||||
class Author(models.Model):
|
||||
publication = models.OneToOneField(Publication, null=True, blank=True)
|
||||
full_name = models.CharField(max_length=255)
|
||||
|
||||
class Author1(models.Model):
|
||||
publication = models.OneToOneField(Publication, null=False)
|
||||
full_name = models.CharField(max_length=255)
|
||||
|
||||
Reference in New Issue
Block a user