Ticket #7252: inheritance_manager_fix.diff
File inheritance_manager_fix.diff, 553 bytes (added by , 17 years ago) |
---|
-
django/db/models/manager.py
diff --git a/django/db/models/manager.py b/django/db/models/manager.py index 3a9da34..2e83ad2 100644
a b class ManagerDescriptor(object): 138 138 def __get__(self, instance, type=None): 139 139 if instance != None: 140 140 raise AttributeError, "Manager isn't accessible via %s instances" % type.__name__ 141 if type is not None and self.manager.model != type: 142 self.manager.model = type 141 143 return self.manager 142 144 143 145 class EmptyManager(Manager):