jazzband / django-taggit

Simple tagging for django
https://django-taggit.readthedocs.io
BSD 3-Clause "New" or "Revised" License
3.33k stars 622 forks source link

AttributeErrors when getting most common tags with latest dev version of Django #804

Closed philgyford closed 2 years ago

philgyford commented 2 years ago

I'm testing an existing, working, project with the very latest commit of Django and I'm getting an error from my custom TaggableManager that I don't get with Django 4.1. I can't see what the problem is.

I have this model:


from django.db import models

class TaggedBookmark(TimeStampedModelMixin, GenericTaggedItemBase):
    tag = models.ForeignKey(
        BookmarkTag,
        on_delete=models.CASCADE,
        related_name="%(app_label)s_%(class)s_items",
    )
class Bookmark(models.Model):
    is_private = models.BooleanField(default=False)
    # other fields

    tags = TaggableManager(manager=_BookmarkTaggableManager, through=TaggedBookmark)
philgyford commented 2 years ago

Sorry, hit Return too quickly and it saved this incomplete issue.