#12769: Queryset.query pickle fails if fields have lazy translations in field
declaration params.
---------------------------------------------------+------------------------
          Reporter:  jtiai                         |         Owner:  nobody     
     
            Status:  reopened                      |     Milestone:  1.2        
     
         Component:  Database layer (models, ORM)  |       Version:  SVN        
     
        Resolution:                                |      Keywords:  orm pickle 
query
             Stage:  Accepted                      |     Has_patch:  0          
     
        Needs_docs:  0                             |   Needs_tests:  0          
     
Needs_better_patch:  0                             |  
---------------------------------------------------+------------------------
Changes (by sjaensch):

 * cc: sjaensch (added)
  * status:  closed => reopened
  * has_patch:  1 => 0
  * resolution:  fixed =>

Comment:

 This is not yet fixed for me. In my session data I have a list of models
 created by MyModel.objects.create(). This was working fine with 1.1.1 and
 gave me the error "PicklingError: Can't pickle <type 'function'>:
 attribute lookup __builtin__.function failed" prior to changeset 12866.
 Post fix, I'm now getting "TypeError: expected string or Unicode object,
 NoneType found" at "pickled = pickle.dumps(session_dict,
 pickle.HIGHEST_PROTOCOL)".

 A workaround is to do MyModel.objects.get(pk=the_new_pk) immediately after
 creation and storing this model object in the session.

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