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

Fix issue with missing tags on MySQL #550

Merged
merged 3 commits into from
Jun 9, 2021

Conversation

jathanism
Copy link
Contributor

@jathanism jathanism commented Jun 8, 2021

Fixes: #389

Had to change the base class for TaggedItem from GenericTaggedItemBase to GenericUUIDTaggedItemBase, to get the django-taggit machinery to do a UUID-based comparison of the prefetched "tags". Without that the prefetched values weren't matching correctly, and were returning empty. (See: jazzband/django-taggit#663)

This does not require any migrations because TaggedItem.object_id was already changed to a UUIDField in a previous commit.

This also fixed an issue that was causing tags from emitting in the API entirely. We do not yet have integration tests for that.

Had to change the base class for `TaggedItem` from `GenericTaggedItemBase` to `GenericUUIDTaggedItemBase`, to get the django-taggit machinery to do a UUID-based comparison of the prefetched "tags". Without that the prefetched values weren't matching correctly, and were returning empty. (See: jazzband/django-taggit#663)
Copy link
Contributor

@glennmatthews glennmatthews left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't suppose we're lucky and this might also impact #512?

No such luck - I checked out your branch and can confirm that #512 is still seen.

@jathanism jathanism merged commit 003c05f into nautobot:develop Jun 9, 2021
@jathanism jathanism deleted the jathanism-mysql-tags branch June 9, 2021 19:19
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

Successfully merging this pull request may close these issues.

Changelog unit test for deleting an object fails on MySQL
2 participants