Skip to content

Resolver: use new methods to resolve documentation pages #10875

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 3 commits into from
Oct 30, 2023

Conversation

stsewd
Copy link
Member

@stsewd stsewd commented Oct 27, 2023

This may result in one queryset less in some cases, others will remain the same.

@@ -912,14 +912,15 @@ def changefreqs_generator():

if project.translations.exists():
for translation in project.translations.all():
translation_versions = (
Copy link
Member Author

Choose a reason for hiding this comment

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

We were fetching all versions from the translation, when we just need to get a version matching the same slug as the current version.

@stsewd stsewd marked this pull request as ready for review October 27, 2023 00:41
@stsewd stsewd requested a review from a team as a code owner October 27, 2023 00:41
@stsewd stsewd requested a review from ericholscher October 27, 2023 00:41
@@ -135,12 +134,10 @@ def get(self, request):
def do_embed(*, project, version, doc=None, path=None, section=None, url=None):
"""Get the embed response from a document section."""
if not url:
external = version.type == EXTERNAL
Copy link
Member

Choose a reason for hiding this comment

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

Do we not need this anymore?

Copy link
Member Author

Choose a reason for hiding this comment

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

We get the type of the version from the version object itself

@stsewd stsewd merged commit 996a5b2 into main Oct 30, 2023
@stsewd stsewd deleted the use-new-resolver-methods branch October 30, 2023 16:30
Copy link

sentry-io bot commented Nov 2, 2023

Suspect Issues

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

  • ‼️ Version.DoesNotExist: Version matching query does not exist. /projects/{project_slug}/ 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