Karen Tracey | 1 Sep 2009 19:17
Picon
Gravatar

Re: unique=True and IntegrityError

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


Gmane