#10992: Unable to re-save inlines with custom char primary key
-------------------------------------------+--------------------------------
          Reporter:  marcob                |         Owner:  nobody             
      
            Status:  new                   |     Milestone:  1.1                
      
         Component:  django.contrib.admin  |       Version:  SVN                
      
        Resolution:                        |      Keywords:  inline custom 
primary key
             Stage:  Accepted              |     Has_patch:  0                  
      
        Needs_docs:  0                     |   Needs_tests:  0                  
      
Needs_better_patch:  0                     |  
-------------------------------------------+--------------------------------
Comment (by marcob):

 Russell, sorry for not having attached a patch, but the fix "runs" only
 with an Attribute Error Exception. So it's impossible it can break other
 cases.
 You have to substitute line 521 with this 4 lines:
 {{{
   try:
     pk_value = form.fields[pk_name].clean(raw_pk_value).pk
   except AttributeError:
     pk_value = form.fields[pk_name].clean(raw_pk_value)

 }}}

 Btw I do agree this is a workaround. We need to fix clean (with charfield
 it doesn't return the instance).

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