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

Fixing how published fact-checks are filtered for bot preview query. #2199

Merged
merged 1 commit into from
Feb 2, 2025

Conversation

caiosba
Copy link
Contributor

@caiosba caiosba commented Jan 31, 2025

Description

Previously, both published and unpublished fact-checks were returned by the Smooch Bot query and then re-filtered in PostgreSQL. The problem with this approach was that if the query returned three results - two published and one unpublished - only the two published fact-checks would remain after re-filtering. This change also makes the code behave more similarly to the real tipline search.

Fixes: CV2-5572.

How has this been tested?

Manually.

Checklist

  • I have performed a self-review of my own code
  • I have added unit and feature tests, if the PR implements a new feature or otherwise would benefit from additional testing
  • I have added regression tests, if the PR fixes a bug
  • I have added logging, exception reporting, and custom tracing with any additional information required for debugging
  • I considered secure coding practices when writing this code. Any security concerns are noted above.
  • I have commented my code in hard-to-understand areas, if any
  • I have made needed changes to the README
  • My changes generate no new warnings
  • If I added a third party module, I included a rationale for doing so and followed our current guidelines

Previously, both published and unpublished fact-checks were returned by the Smooch Bot query and then re-filtered in PostgreSQL. The problem with this approach was that if the query returned three results—two published and one unpublished—only the two published fact-checks would remain after re-filtering. This change also makes the code behave more similarly to the real tipline search.

Fixes: CV2-5572.
@caiosba caiosba requested review from computermacgyver and removed request for jayjay-w and vasconsaurus January 31, 2025 23:12
@caiosba caiosba merged commit 866d888 into develop Feb 2, 2025
10 of 11 checks passed
@caiosba caiosba deleted the fix/CV2-5572-bot-preview-published-fact-checks branch February 2, 2025 21:10
Copy link

sentry-io bot commented Feb 6, 2025

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

  • ‼️ JSON::ParserError: unexpected token at ' app/models/concerns/alegre_v2.rb in parse_response View Issue

Did you find this useful? React with a 👍 or 👎

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.

2 participants