#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.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070181f92a9b0b-714d6cc0-d2e7-48d8-ae01-8cf946a15cb9-000000%40eu-central-1.amazonses.com.

Reply via email to