My model, "Server", contains a field called "model". Since this function
checks for the "model" attribute to determine if the object is a Queryset
it breaks.
A simple switch of the statements should work fine.
http://code.google.com/p/django-tagging/source/browse/trunk/tagging/utils.py#129
:
def get_queryset_and_model(queryset_or_model):
"""
Given a ``QuerySet`` or a ``Model``, returns a two-tuple of
(queryset, model).
If a ``Model`` is given, the ``QuerySet`` returned will be created
using its default manager.
"""
try:
return queryset_or_model, queryset_or_model.model
except AttributeError:
return queryset_or_model._default_manager.all(), queryset_or_model
Original issue reported on code.google.com by paul...@gmail.com on 19 Mar 2010 at 4:53
Original issue reported on code.google.com by
paul...@gmail.com
on 19 Mar 2010 at 4:53