summaryrefslogtreecommitdiffstats
path: root/askbot/models/base.py
diff options
context:
space:
mode:
Diffstat (limited to 'askbot/models/base.py')
-rw-r--r--askbot/models/base.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/askbot/models/base.py b/askbot/models/base.py
index 5f496d43..0686d50c 100644
--- a/askbot/models/base.py
+++ b/askbot/models/base.py
@@ -30,6 +30,13 @@ class BaseQuerySetManager(models.Manager):
>>> objects = SomeManager()
"""
def __getattr__(self, attr, *args):
+ ## The following two lines fix the problem from this ticket:
+ ## https://code.djangoproject.com/ticket/15062#comment:6
+ ## https://code.djangoproject.com/changeset/15220
+ ## Queryset.only() seems to suffer from that on some occasions
+ if attr.startswith('_'):
+ raise AttributeError
+ ##
try:
return getattr(self.__class__, attr, *args)
except AttributeError: