diff options
| author | Nguyen You <tunt081295@gmail.com> | 2020-10-27 16:51:03 +0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-27 10:51:03 +0100 |
| commit | 0b4fe82c7405ba96f2eb25b954a8f498cc8364b3 (patch) | |
| tree | adc74b1290ce00f8e337306c5b792847c460d815 | |
| parent | c3b1e41288bc99b6e2f188ccfdafb7016d14b783 (diff) | |
Improved naming consistency in BaseManage.contribute_to_class().
Matches signatures of other contribute_to_class() methods.
| -rw-r--r-- | django/db/models/manager.py | 8 |
1 files changed, 4 insertions, 4 deletions
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): """ |
