#30436: on_delete attribute must be callable.
-------------------------------------+-------------------------------------
     Reporter:  Rémy Hubscher        |                    Owner:  nobody
         Type:                       |                   Status:  new
  Cleanup/optimization               |
    Component:  Database layer       |                  Version:  master
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by felixxm):

 * component:  Uncategorized => Database layer (models, ORM)
 * version:  2.2 => master
 * type:  Uncategorized => Cleanup/optimization
 * stage:  Unreviewed => Accepted


Comment:

 Thanks for the report. I can imagine that someone may provide custom
 `on_delete` behavior, hence I don't think we should validate this
 attribute with a static list of `on_delete` behaviors defined by Django.
 IMO we can raise
 {{{
 raise ValueError('on_delete must be callable.')
 }}}
 in `__init__()`.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/30436#comment:2>
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.06c32b9bd29cd7d4f2235d1c8a5fe02c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to