Thursday, June 24, 2010

Re: null=False, blank=True and errors saving in admin?

On Thu, Jun 24, 2010 at 6:45 PM, ringemup <ringemup@gmail.com> wrote:

Thanks, that didn't show up in my search, but it's exactly the same
traceback.

The ticket description seems to indicate the bug only applies to
testing situations, but clearly it occurs in the default ModelForm
(and thereby in the admin) any time a foreign key is set to
null=False, blank=True.  Leaving a field blank and filling it in in
the model's save() method seems to be a pretty common case, and I
would think should be allowed without creating a custom ModelForm.

Should this be listed somewhere as a backwards-incompatible change,
since it worked in 1.0?


I don't believe it was an intentional change in behavior, thus I think it is a bug that should be fixed, not a change that should be documented. But I'm not all that familiar with the model validation changes, so I'm not 100% sure of that nor do I know the right way to fix it.

Karen

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