#12028: Generic Inline doesn't validate unique_together
--------------------------------------------------+-------------------------
               Reporter:  diverman                |         Owner:              
                                                                
                 Status:  new                     |     Milestone:  1.3         
                                                                
              Component:  Contrib apps            |       Version:  1.2         
                                                                
             Resolution:                          |      Keywords:  content 
type generic inline unique validation formset admin modeladmin model
           Triage Stage:  Design decision needed  |     Has patch:  0           
                                                                
    Needs documentation:  0                       |   Needs tests:  0           
                                                                
Patch needs improvement:  0                       |  
--------------------------------------------------+-------------------------
Changes (by jnns):

 * cc: jvajen@… (added)
  * stage:  Accepted => Design decision needed


Comment:

 The reason for this exception being raised is that both fields
 `content_type` and `object_id` are being excluded from the inline formset
 as a default. `_get_unique_checks()` omits the excluded fields from
 checking for unique constraints and therefore no ValidationError is raised
 during form validation.

 I don't know whether a patch is needed or if the form validation should be
 done manually in this case.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/12028#comment:9>
Django <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 django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to