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

Get spanish translations from active subjects #4445

Merged
merged 2 commits into from
Sep 18, 2024

Conversation

hamza-56
Copy link
Contributor

This PR updates populate_product_catalog command to get Spanish translations from active subjects

@@ -116,7 +116,7 @@ def get_products(self, product_type, product_source):
).filter(Q(num_orgs__gt=0) & Q(card_image__isnull=False) & ~Q(card_image=''))

subject_translations = Prefetch(
'courses__subjects__translations',
'active_subjects__translations',
Copy link
Contributor

Choose a reason for hiding this comment

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

This argument should be lookup, I don't think active subjects (a property) would work here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tested it locally, and it appears to be working fine.

Copy link
Contributor

@AfaqShuaib09 AfaqShuaib09 left a comment

Choose a reason for hiding this comment

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

Verified on local, Spanish Translation of subjects have been added successfully

image

@hamza-56 hamza-56 force-pushed the hamza/get-spanish-translations-from-active-subjects branch from 8d1c503 to 43d5e2f Compare September 18, 2024 12:56
@hamza-56 hamza-56 force-pushed the hamza/get-spanish-translations-from-active-subjects branch from 43d5e2f to 2c569c2 Compare September 18, 2024 13:49
@hamza-56 hamza-56 merged commit 599858f into master Sep 18, 2024
11 of 12 checks passed
@hamza-56 hamza-56 deleted the hamza/get-spanish-translations-from-active-subjects branch September 18, 2024 21:44
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.

4 participants