Re: [Django] #33841: Django shouldn't fail (bulk-)update silently when QuerySet is already evaluated.

6 views
Skip to first unread message

Django

unread,
Jul 13, 2022, 4:05:31 PM7/13/22
to django-...@googlegroups.com
#33841: Django shouldn't fail (bulk-)update silently when QuerySet is already
evaluated.
-------------------------------------+-------------------------------------
Reporter: Shibel Karmi | Owner: nobody
Mansour |
Type: Uncategorized | Status: closed
Component: Database layer | Version: 3.2
(models, ORM) | Resolution:
Severity: Normal | worksforme
Keywords: update, bulk- | Triage Stage:
update, queryset | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Shibel Karmi Mansour):

I appreciate you taking the time to look into this, I don't think it
should've been closed.

Maybe in initial_queryset you filter out conditions that don't match
any rows after adding MyOtherModel instances, it's hard to tell.

That is not the case, and why would adding some `OtherModel` instances
through iteration affect the results on `MyObject` models?

The code I put up above does not omit any ORM-level action, I've stopped
the debugger one line before the `update()` call and the queryset size is
> 0, only after I call the `update()` the queryset size becomes 0 (I'm not
doing ANY filtering when doing the `update()` call, so that seems non-
sensical).

In any case, I don't think an update should fail silently.

--
Ticket URL: <https://code.djangoproject.com/ticket/33841#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jul 14, 2022, 2:11:02 AM7/14/22
to django-...@googlegroups.com
#33841: Django shouldn't fail (bulk-)update silently when QuerySet is already
evaluated.
-------------------------------------+-------------------------------------
Reporter: Shibel Karmi | Owner: nobody
Mansour |
Type: Uncategorized | Status: closed
Component: Database layer | Version: 3.2
(models, ORM) | Resolution:
Severity: Normal | worksforme
Keywords: update, bulk- | Triage Stage:
update, queryset | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak):

> I appreciate you taking the time to look into this, I don't think it
should've been closed.

I cannot reproduce your issue, that's why it's closed. I don't think
you've explained the issue in enough detail to confirm a bug in Django.
Please reopen the ticket if you can debug your issue and provide details
about why and where Django is at fault.

--
Ticket URL: <https://code.djangoproject.com/ticket/33841#comment:4>

Reply all
Reply to author
Forward
0 new messages