Skip to content

fix and simplify get_visible_document_or_404 #6710

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

Merged
merged 1 commit into from
Jun 6, 2025

Conversation

escattone
Copy link
Contributor

@escattone escattone commented Jun 6, 2025

mozilla/sumo#2364
mozilla/sumo#2365

This PR also simplifies get_visible_document_or_404().

@escattone escattone requested a review from smithellis June 6, 2025 18:51
Comment on lines -217 to -219
translation = parent.translated_to(locale, visible_for_user=user)
if translation:
return translation
Copy link
Contributor Author

@escattone escattone Jun 6, 2025

Choose a reason for hiding this comment

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

I removed these lines because they're redundant. This case is already handled by the other_docs_qs-related code above.

@escattone escattone force-pushed the locale-switcher-adjustments branch from 2a0d23b to 1511cf0 Compare June 6, 2025 19:27
@escattone escattone changed the title simplify and fix get_visible_document_or_404 fix and simplifyget_visible_document_or_404 Jun 6, 2025
@escattone escattone changed the title fix and simplifyget_visible_document_or_404 fix and simplify get_visible_document_or_404 Jun 6, 2025
Copy link
Contributor

@smithellis smithellis left a comment

Choose a reason for hiding this comment

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

Thanks @escattone !

@escattone escattone merged commit 91c5293 into mozilla:main Jun 6, 2025
2 checks passed
@escattone escattone deleted the locale-switcher-adjustments branch June 6, 2025 22:29
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