diff --git a/django/db/models/manager.py b/django/db/models/manager.py index e10c15b9ea..e4d8fd0efc 100644 --- a/django/db/models/manager.py +++ b/django/db/models/manager.py @@ -109,13 +109,13 @@ class BaseManager: **cls._get_queryset_methods(queryset_class), }) - def contribute_to_class(self, model, name): + def contribute_to_class(self, cls, name): self.name = self.name or name - self.model = model + self.model = cls - setattr(model, name, ManagerDescriptor(self)) + setattr(cls, name, ManagerDescriptor(self)) - model._meta.add_manager(self) + cls._meta.add_manager(self) def _set_creation_counter(self): """