Re: [Django] #11194: Saving proxy model with raw=True gives UnboundLocalError 'record_exists'

2009-08-22 Thread Django
#11194: Saving proxy model with raw=True gives UnboundLocalError 'record_exists'
---+
  Reporter:  wardi | Owner:  nobody 
  
Status:  closed| Milestone:  1.1
  
 Component:  Database layer (models, ORM)  |   Version:  1.1-beta-1 
  
Resolution:  fixed |  Keywords:  proxy 
model serialization
 Stage:  Unreviewed| Has_patch:  1  
  
Needs_docs:  0 |   Needs_tests:  1  
  
Needs_better_patch:  1 |  
---+
Comment (by nikecitycn):

 [http://www.sneakersupplier.com Nike air force ones]
 [http://www.sneakersupplier.com Air Jordan shoes]
 [http://www.sneakersupplier.com Nike Dunks]
 [http://www.sneakersupplier.com Nike Shox]
 [http://www.sneakersupplier.com Nike Shoes]

-- 
Ticket URL: 
Django 
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
-~--~~~~--~~--~--~---



Re: [Django] #11194: Saving proxy model with raw=True gives UnboundLocalError 'record_exists'

2009-08-20 Thread Django
#11194: Saving proxy model with raw=True gives UnboundLocalError 'record_exists'
---+
  Reporter:  wardi | Owner:  nobody 
  
Status:  closed| Milestone:  1.1
  
 Component:  Database layer (models, ORM)  |   Version:  1.1-beta-1 
  
Resolution:  fixed |  Keywords:  proxy 
model serialization
 Stage:  Unreviewed| Has_patch:  1  
  
Needs_docs:  0 |   Needs_tests:  1  
  
Needs_better_patch:  1 |  
---+
Comment (by nikecitycn):

 [http://www.sneakersupplier.com Nike air force ones]
 [http://www.sneakersupplier.com Air Jordan shoes]
 [http://www.sneakersupplier.com Nike Dunks]
 [http://www.sneakersupplier.com Nike Shox]
 [http://www.sneakersupplier.com Nike Shoes]

-- 
Ticket URL: 
Django 
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
-~--~~~~--~~--~--~---



Re: [Django] #11194: Saving proxy model with raw=True gives UnboundLocalError 'record_exists'

2009-08-20 Thread Django
#11194: Saving proxy model with raw=True gives UnboundLocalError 'record_exists'
---+
  Reporter:  wardi | Owner:  nobody 
  
Status:  closed| Milestone:  1.1
  
 Component:  Database layer (models, ORM)  |   Version:  1.1-beta-1 
  
Resolution:  fixed |  Keywords:  proxy 
model serialization
 Stage:  Unreviewed| Has_patch:  1  
  
Needs_docs:  0 |   Needs_tests:  1  
  
Needs_better_patch:  1 |  
---+
Comment (by sunrise):

 OK, so the problem is a combination of using raw=True (as fixture loading
 (always?) does) and proxy models. It looks to me like the save_base
 routine is coded to never expect to be called with both raw=True and
 meta.proxy=True. The attached patch fixes the visible error (avoids an
 exception) but the resulting behavior of the function does not appear to
 be correct.[http://www.tagnice.com  nike air yeezy] It sends a pre-save
 signal, then skips out on the saving of parent class(es) because raw is
 True, then skips out on the remainder of the try an update, try an insert
 logic because meta.proxy is True. The only thing left not under the if not
 meta.proxy is the sending of the post save signal. So that patch makes it
 possible to call the routine, and the pre and post save signals will be
 sent, but nothing will be saved. There seems to be a deeper problem than a
 local variable used before being set here.

-- 
Ticket URL: 
Django 
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
-~--~~~~--~~--~--~---



Re: [Django] #11194: Saving proxy model with raw=True gives UnboundLocalError 'record_exists'

2009-06-05 Thread Django
#11194: Saving proxy model with raw=True gives UnboundLocalError 'record_exists'
---+
  Reporter:  wardi | Owner:  nobody 
  
Status:  new   | Milestone:  1.1
  
 Component:  Database layer (models, ORM)  |   Version:  1.1-beta-1 
  
Resolution:|  Keywords:  proxy 
model serialization
 Stage:  Unreviewed| Has_patch:  1  
  
Needs_docs:  0 |   Needs_tests:  1  
  
Needs_better_patch:  1 |  
---+
Changes (by dc):

  * keywords:  record_exists db import => proxy model serialization
  * component:  Uncategorized => Database layer (models, ORM)
  * summary:  django.db.models.base.py: UnboundLocalError: local variable
  'record_exists' referenced before assignment =>
  Saving proxy model with raw=True gives
  UnboundLocalError 'record_exists'

-- 
Ticket URL: 
Django 
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
-~--~~~~--~~--~--~---