#13091: admin list_editable with unique_together raises Integrity Error
---------------------------------------------+------------------------------
          Reporter:  slafs                   |         Owner:  nobody           
                           
            Status:  new                     |     Milestone:                   
                           
         Component:  django.contrib.admin    |       Version:  SVN              
                           
        Resolution:                          |      Keywords:  list_editable 
unique_together IntegrityError
             Stage:  Design decision needed  |     Has_patch:  0                
                           
        Needs_docs:  0                       |   Needs_tests:  0                
                           
Needs_better_patch:  0                       |  
---------------------------------------------+------------------------------
Changes (by kmtracey):

  * needs_better_patch:  => 0
  * needs_docs:  => 0
  * stage:  Unreviewed => Design decision needed
  * needs_tests:  => 0
  * milestone:  1.2 =>

Comment:

 This is not a regression, so at this point not a candidate for 1.2.

 Fields not on a model form are excluded from unique_together checking.
 This is noted here:
 
http://docs.djangoproject.com/en/dev/ref/models/instances/#django.db.models.Model.validate_unique,
 though you kind of have to guess that this call with non-editable fields
 excluded is what's going to happen for the admin change list page.

 Possibly the unique validation code could be changed to use existing
 instance values, if present, for excluded fields instead of simply
 dropping them from consideration. Not sure why it doesn't do that already.

 A different ticket ought to be opened for the error message only saying
 "Please correct the errors below" and nothing about the actual problem.
 That's a different issue.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/13091#comment:1>
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 [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