﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
27664	Manager.contribute_to_class() is called with abstract model rather than concrete model	Johannes Maron	nobody	"Since 1.10 `Manager.contribute_to_class` gets called with the model on which the manager is defined instead of the subclass.
Before that it used to be called for all sub models with the proper class.

You can easily reproduce that by running this in both version 1.9 and 1.10. `model` will be different.

{{{
class MyManager(models.Manager):
 		 
     def contribute_to_class(self, model, name):
         super().contribute_to_class(model, name)
         print(model)

class AbstractModel(models.Model):
    objects = MyManager()
    class Meta:
        abstract = True

class ContcreteModel(AbstractModel):
    pass
}}}

This change has not been documented in the release notes and also seems counter intuitive. Contribute to class should be called with the concrete model.
"	Bug	closed	Database layer (models, ORM)	1.10	Normal	needsinfo		info@… Loic Bistuer	Unreviewed	0	0	0	0	0	0
