Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception raised on usage_for_model #7

Open
Lacrymology opened this issue Sep 20, 2011 · 1 comment
Open

Exception raised on usage_for_model #7

Lacrymology opened this issue Sep 20, 2011 · 1 comment

Comments

@Lacrymology
Copy link

In [20]: Tag.objects.usage_for_model(Stream)
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
/home/lacrymology/workspace/django/groupsolo/radiopirate/<ipython-input-20-72f5e29df210> in <module>()
----> 1 Tag.objects.usage_for_model(Stream)

    /home/lacrymology/workspace/django/groupsolo/radiopirate/src/django-tagging/tagging/models.pyc in     usage_for_model(self, model, counts, min_count, filters)
    156         for f in filters.items():
    157             queryset.query.add_filter(f)
--> 158         usage = self.usage_for_queryset(queryset, counts, min_count)
    159 
    160         return usage

    /home/lacrymology/workspace/django/groupsolo/radiopirate/src/django-tagging/tagging/models.pyc in     usage_for_queryset(self, queryset, counts, min_count)
    174         """
    175 
--> 176         extra_joins = ' '.join(queryset.query.get_from_clause()[0][1:])
    177         where, params = queryset.query.where.as_sql()
    178         if where:

AttributeError: 'Query' object has no attribute 'get_from_clause'
@gora
Copy link

gora commented May 8, 2013

Take a look at the discussion on the same bug, which includes
a patch that seems to work for me with django-tagging-ng also:
http://code.google.com/p/django-tagging/issues/detail?id=233

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants