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

Migrate Documents to new Topics #6082

Merged
merged 1 commit into from
Jun 26, 2024
Merged

Conversation

akatsoulas
Copy link
Collaborator

No description provided.

@akatsoulas akatsoulas marked this pull request as draft June 24, 2024 16:29
kitsune/products/migrations/0010_auto_20240624_0616.py Outdated Show resolved Hide resolved
kitsune/products/migrations/0010_auto_20240624_0616.py Outdated Show resolved Hide resolved
kitsune/products/migrations/0010_auto_20240624_0616.py Outdated Show resolved Hide resolved
"emails-thunderbird",
"set-up-email-thunderbird",
],
"customize-settings-and-preferences": [
Copy link
Contributor

Choose a reason for hiding this comment

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

This list is missing sync.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I know - it just felt weird to pull out sync from the Sync topics and I wanted to reconfirm this with the content team

kitsune/products/migrations/0010_auto_20240624_0616.py Outdated Show resolved Hide resolved
@akatsoulas akatsoulas marked this pull request as ready for review June 25, 2024 12:56
@akatsoulas
Copy link
Collaborator Author

@escattone this should be ready for a review. I tested it locally and it runs without errors

Copy link
Contributor

@escattone escattone left a comment

Choose a reason for hiding this comment

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

r+wc -- Thanks @akatsoulas!

document.topics.remove(source_topic)

# Migrate questions to the new topic
if source_topic.questions.exists():
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit. I don't think this line is needed, since the source_topic.questions.all() below will return an empty list if the topic has no associated questions.

@akatsoulas akatsoulas merged commit a9a5e82 into mozilla:main Jun 26, 2024
2 checks passed
@akatsoulas akatsoulas deleted the migrate-topics branch June 26, 2024 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants