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 news item topics filter #1068

Merged
merged 1 commit into from
May 22, 2024
Merged

Fix news item topics filter #1068

merged 1 commit into from
May 22, 2024

Conversation

brylie
Copy link
Member

@brylie brylie commented May 22, 2024

No description provided.

@brylie brylie merged commit fa2150e into main May 22, 2024
3 of 4 checks passed
@brylie brylie deleted the fix-news-items-topics-filter branch May 22, 2024 18:39
Copy link

sonarcloud bot commented May 22, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @brylie - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟡 General issues: 1 issue found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

from .models import NewsItem


class NewsItemFilterSet(PageListingViewSet.filterset_class):
topics__topic = django_filters.ModelChoiceFilter(
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion: Consider renaming the filter field.

The field name topics__topic might be confusing. Consider renaming it to something more intuitive like topic to improve readability.

Suggested change
topics__topic = django_filters.ModelChoiceFilter(
topic = django_filters.ModelChoiceFilter(

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

1 participant