Wednesday, June 1, 2011

column cannot be null

I'm getting an error leaving a field blank but I have blank = True in
the model

IntegrityError at /admin/afiliados/afiliado/add/
(1048, "Column 'titular_id' cannot be null")
Request Method: POST
Request URL: http://localhost/mysite/admin/afiliados/afiliado/add/
Django Version: 1.3
Exception Type: IntegrityError
Exception Value:
(1048, "Column 'titular_id' cannot be null")


------------------------
class afiliado(models.Model):
....other fields...
titular = models.OneToOneField("self",blank = True)


Thanks!

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment