Commits

offline committed 8d3231e

now we use new django method - only() to get id's of items

  • Participants
  • Parent commits 26335d6

Comments (0)

Files changed (1)

File tagging2/managers.py

         """
         Obtain a list of dicts with tag names and counters if counts is True
         """
-        objects_id = [i.pk for i in queryset]
+        objects_id = [i.pk for i in queryset.only("id")]
         ctype = ContentType.objects.get_for_model(self.model)
         qs = TaggedItem.objects.filter(content_type=ctype, object_id__in=objects_id).values('tag__name')
         qs = qs.annotate(count=Count('tag'))