On Sun, Aug 21, 2011 at 12:33 PM, Torsten <torstenzan...@googlemail.com> wrote:
> Hi
>
> I simply want the DateTime to be set to null.
>
> payed_at = models.DateTimeField(null=True)
>
> but always get this as an error:
>
> IntegrityError at /admin/invoice/invoice/add/
> invoice_invoice.payed_at may not be NULL
>
>
> Thanks for help.
>
> Torsten
>

IntegrityError comes from the database, so django was happy with
having payed_at=None, but your database wasn't. I suspect you added
null=True to your model after having run syncdb, and the database
table does not reflect the model.

Remember that syncdb does not modify tables that already exist, or
validate that they match their corresponding models.

Cheers

Tom

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to