#3230: <MODEL>.validate() doesn't consider unique=True in model definition.
----------------------------------------+-----------------------------------
   Reporter:  [EMAIL PROTECTED]  |                Owner:  adrian          
     Status:  closed                    |            Component:  Database 
wrapper
    Version:                            |           Resolution:  invalid        
 
   Keywords:                            |                Stage:  Unreviewed     
 
  Has_patch:  0                         |           Needs_docs:  0              
 
Needs_tests:  0                         |   Needs_better_patch:  0              
 
----------------------------------------+-----------------------------------
Comment (by anonymous):

 Replying to [comment:6 Michael Radziej <[EMAIL PROTECTED]>]:
 > I don't understand the report, and the reporter doesn't reply.
 
 I haven't replied because I don't think that I could make the problem any
 clearer, Thomas Steinacher figured it out.
 
 Replying to [comment:5 Michael Radziej <[EMAIL PROTECTED]>]:
 > Yeah, and validate has not been fully implemented, yet, and should not
 be used at all.
 >
 > But iaihmb doesn't even call validate() in his code, nor does newforms
 or Model.save(). I don't see where validate comes into play here.
 Shouldn't the summarybe 'newforms does not check uniqueness' or > similar?
 
 <MODEL>.validate() will return true even if the model definition includes
 unique=True and the data isn't unique. As I said in the description the
 code I posted was a workaround for <MODEL>.validate() because it doesn't
 function as expected. I know that <MODEL>.validate() isn't complete, it
 was a suggestion for the implementation. The new forms library isn't
 complete either and people create tickets for it, so what's the problem?
 
 Either way, in hindsight the suggestion was a bad one once you take into
 consideration the race condition.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/3230#comment:7>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to