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

Fixed prefetch_related when using UUIDTaggedItem #663

Merged
merged 3 commits into from Feb 26, 2020
Merged

Fixed prefetch_related when using UUIDTaggedItem #663

merged 3 commits into from Feb 26, 2020

Conversation

ghost
Copy link

@ghost ghost commented Feb 15, 2020

Fix for #490

@codecov
Copy link

codecov bot commented Feb 15, 2020

Codecov Report

Merging #663 into master will decrease coverage by 0.11%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #663      +/-   ##
==========================================
- Coverage   94.78%   94.67%   -0.12%     
==========================================
  Files           3        3              
  Lines         422      432      +10     
  Branches       76       78       +2     
==========================================
+ Hits          400      409       +9     
  Misses         14       14              
- Partials        8        9       +1     

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 954d836...e041568. Read the comment docs.

@nyk510
Copy link
Member

nyk510 commented Feb 21, 2020

Great Job:D

@auvipy auvipy merged commit 23ac104 into jazzband:master Feb 26, 2020
jathanism added a commit to jathanism/nautobot that referenced this pull request Jun 8, 2021
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)
jathanism added a commit to nautobot/nautobot that referenced this pull request Jun 9, 2021
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.
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.

None yet

2 participants