Changed the nomcom __getattr__ mixin manager so as to not interfere with django 1.10 internals.
- Legacy-Id: 12811
This commit is contained in:
parent
b762273400
commit
deb8ab6dba
|
@ -1,14 +1,17 @@
|
|||
from django.db import models
|
||||
from django.db.models.query import QuerySet
|
||||
|
||||
import debug # pyflakes:ignore
|
||||
|
||||
class MixinManager(object):
|
||||
def __getattr__(self, attr, *args):
|
||||
try:
|
||||
return getattr(self.__class__, attr, *args)
|
||||
except AttributeError:
|
||||
return getattr(self.get_queryset(), attr, *args)
|
||||
|
||||
if attr.startswith('__'):
|
||||
return getattr(self.__class__, attr, *args)
|
||||
else:
|
||||
try:
|
||||
return getattr(self.__class__, attr, *args)
|
||||
except AttributeError:
|
||||
return getattr(self.get_queryset(), attr, *args)
|
||||
|
||||
class NomineePositionQuerySet(QuerySet):
|
||||
|
||||
|
|
Loading…
Reference in a new issue