AFAIK when you try to access it ( quests[579] ) it gets loaded so
performing .delete is possible.

My guess is that you are none-ifying the id somehow either by operating
with it or by improper redefinition of the id field in your model.

El 21 de enero de 2012 18:49, JohnA <john.armstrong....@gmail.com> escribió:

> Is your code really that simple - I mean get the queryset and
> immediately try to delete something out of it?  If so, maybe it's time
> to step through the delete in the debugger.  Querysets are lazy but I
> assume that referencing an item in the queryset kike you do will cause
> the actual data to get feteched.  Maybe the problem is trying to
> delete something directly out of the queryset, or maybe you're somehow
> deleting the same record twice, or maybe django is somehow getting
> confused while performing the operation.
>
> -- John
>
> On Jan 21, 6:39 pm, Chris Seberino <cseber...@gmail.com> wrote:
> > On Jan 21, 2:43 pm, JohnA <john.armstrong....@gmail.com> wrote:
> >
> > > How are you finding these objects?  That might point to the answer.
> >
> > > Probably the likeliest explanation is that you are creating the
> > > objects but not saving them.
> >
> > In the Django shell I do
> >
> > quests = Question.objects.all()
> > quests[579].delete()
> >
> > Why does the objects.all() invocation add this id=None crud to quests
> > list?
> >
> > cs
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>


-- 
Regards,

Leandro Ostera,
*BLOG - Check what I'm doing now <http://imakeapps.alwaysdata.net>
EMAIL - Write me an email <leost...@gmail.com>
SHOWCASE - Check my latest projects <http://ishowcase.alwaysdata.net>*

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to