It seems to me you can just do:
if self.field.cache_choices:
    qs = self.queryset
else:
    qs = self.queryset.all()
for obj in qs:
   ....

On Jun 19, 10:04 am, Jason Davies <[EMAIL PROTECTED]> wrote:
> Hello,
>
> We have a reasonably high-traffic site, which started intermittently
> throwing "ValueError: generator already executing" errors under high
> load.  This started happening after updating to a more recent trunk
> revision (r7601).
>
> After much digging around, it seems there is a race condition in
> ModelChoiceIterator.  See ticket #7475 [1] for a patch and more
> details.
>
> I'm not sure there's good way to add a regression test for something
> like this, any comments would be appreciated.
>
> Cheers,
>
> Jason
>
> [1]:http://code.djangoproject.com/ticket/7475
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to