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 results/query in api/v1/featured_tags/suggestions #29597

Merged

Conversation

mjankowski
Copy link
Contributor

The bug fix here is pulled from #28815 which found it as a side effect, but did not fully flesh out a spec to show the issue. Changes here:

  • Remove the tag from the featured tag fabricator - this class sets this internally from the name of the tag
  • Remove extraneous/unused account_id in params in the request spec
  • Connect the account and user in request spec
  • Add assertions about which tag is found in the results (the recently used but not featured one), verify this fails
  • Update controller query to match tag ids with tag ids. The previous query was something like "where tag id is not in featured tags", but this was comparing against the id of the featuredtag records, not the tag_id connected to them.

Will rebase that other one after this, as I think this (and the other usage) would still read better as scopes.

@mjankowski mjankowski added bug Something isn't working ruby Pull requests that update Ruby code to backport PR needed to be backported labels Mar 14, 2024
@mjankowski mjankowski force-pushed the api-v1-featured-tags-suggestions-query branch from 0283f5b to ac82d1d Compare March 18, 2024 14:15
@mjankowski mjankowski force-pushed the api-v1-featured-tags-suggestions-query branch from ac82d1d to 8232b3f Compare March 19, 2024 14:28
@mjankowski mjankowski requested a review from a team March 19, 2024 18:10
@ClearlyClaire ClearlyClaire added this pull request to the merge queue Mar 22, 2024
Merged via the queue into mastodon:main with commit 34f2934 Mar 22, 2024
27 checks passed
@mjankowski mjankowski deleted the api-v1-featured-tags-suggestions-query branch March 22, 2024 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ruby Pull requests that update Ruby code to backport PR needed to be backported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants