#33505: Inconsistent Behavior with Abstract Models and Signals
-------------------------------------+-------------------------------------
     Reporter:  Ken Weaver           |                    Owner:  nobody
         Type:  Bug                  |                   Status:  closed
    Component:  Database layer       |                  Version:  3.2
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:  invalid
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Ken Weaver):

 Yes it seemed very strange to me too, I thought the signal should be
 received either when an inherited model's `ManyToManyField` changed (this
 was my mistake) or not at all. But instead it is received for every
 `m2m_changed`, even for completely unrelated models.

 I now understand why; I just checked and `Abstract.m2m_field.through`
 itself is actually `None`. This makes sense (somewhat) since of course you
 can't have a concrete many to many table for an abstract model. I would
 think one could change `ManyToManyField` to itself be some kind of
 abstract model or a dummy class when attached to an abstract model, but
 you will know more about the inners of Django to know if something like
 that is feasible or justified.
 Replying to [comment:5 Mariusz Felisiak]:
 > `Abstract` is not used in models from the ticket description🤔, it's an
 abstract model that is not inherited from any concrete model. I'm puzzled.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/33505#comment:6>
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/068.a956a2f22df46282d6c36e09cd8a90fa%40djangoproject.com.

Reply via email to