#28099: Reuse of UpdateQuery breaks complex delete updates
-------------------------------------+-------------------------------------
     Reporter:  milosu               |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Database layer       |                  Version:  1.11
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  1
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by milosu):

 Depends on what you mean by custom on_delete handler.

 Collector.add_field_update is called from models.CASCADE - this sets None
 => can not trigger this bug. Same holds true for models.SET_NULL.

 Than there are handlers like models.SET() and models.SET_DEFAULT => bug
 could be triggered, if callable with variable output is used in these
 handlers.
 I do not have real-world use cases using these "default" handlers, but I
 can produce silly looking regression test cases using specially crafted
 field.default or models.SET callables that will also trigger assertion
 failure.

 The bug report use case is the real-world one, anyway.

--
Ticket URL: <https://code.djangoproject.com/ticket/28099#comment:8>
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.fa173ed74952cad6bbcc6565857058c2%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to