#7682: edit_inline issues error(s) incorrectly when going from revision 7710 to
TRUNK
--------------------------------------+-------------------------------------
          Reporter:  jleingang        |         Owner:  nobody                
            Status:  new              |     Milestone:                        
         Component:  Admin interface  |       Version:  SVN                   
        Resolution:                   |      Keywords:  edit_inline validation
             Stage:  Accepted         |     Has_patch:  0                     
        Needs_docs:  0                |   Needs_tests:  0                     
Needs_better_patch:  0                |  
--------------------------------------+-------------------------------------
Changes (by [EMAIL PROTECTED]):

 * cc: [EMAIL PROTECTED] (added)

Comment:

 As Karen Tracey say, the problem seems to be in
 db/models/fields/__init__.py at line 329

 Before r7790, on the id field, the unique attribute return false even if
 the field was a primary key. r7790 correct this, but introduce the bug.
 Am i wrong ?

 I changed the condition on line 329 from :
 {{{
 if self.unique or (self.primary_key and not rel):
 }}}
 to :
 {{{
 if not rel and (self.unique or self.primary_key):
 }}}

 It work for me, but, i don't know if this may not create some problems
 when you have a related object with a unique field (other than the primary
 key). This may need more tests.

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