1 Sep 2009 19:17
Re: unique=True and IntegrityError
Karen Tracey <kmtracey <at> gmail.com>
2009-09-01 17:17:22 GMT
2009-09-01 17:17:22 GMT
On Tue, Sep 1, 2009 at 12:51 PM, aa56280 <aa56280 <at> gmail.com> wrote:
You're right, I did leave out something - the clean() method. Nothing
unusual there. In fact, if I take out everything from the method and
leave the shell:
def clean(self):
return self.cleaned_data
It still craps out. However, if I take away the entire method, then I
do get the validation error.
The check for unique fields is done in the base ModelForm clean method. By overriding clean without calling the superclass clean you are causing the checks to be bypassed.
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 <at> googlegroups.com
To unsubscribe from this group, send email to django-users+unsubscribe <at> googlegroups.com
For more options, visit this group at http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---
RSS Feed