Skip to content

Commit deb8ab6

Browse files
committed
Changed the nomcom __getattr__ mixin manager so as to not interfere with django 1.10 internals.
- Legacy-Id: 12811
1 parent b762273 commit deb8ab6

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

ietf/nomcom/managers.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
from django.db import models
22
from django.db.models.query import QuerySet
33

4+
import debug # pyflakes:ignore
45

56
class MixinManager(object):
67
def __getattr__(self, attr, *args):
7-
try:
8-
return getattr(self.__class__, attr, *args)
9-
except AttributeError:
10-
return getattr(self.get_queryset(), attr, *args)
11-
8+
if attr.startswith('__'):
9+
return getattr(self.__class__, attr, *args)
10+
else:
11+
try:
12+
return getattr(self.__class__, attr, *args)
13+
except AttributeError:
14+
return getattr(self.get_queryset(), attr, *args)
1215

1316
class NomineePositionQuerySet(QuerySet):
1417

0 commit comments

Comments
 (0)