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

Properly map language labels #4018

Merged
merged 3 commits into from
Apr 12, 2023

Conversation

rtibbles
Copy link
Member

Summary

Description of the change(s) you made

  • Fix language label generation.
  • Add test for language pagination labels.

Manual verification steps performed

  1. Added automated test.
  2. Ran the server and went to http://127.0.0.1:8080/api/public/v2/contentnode/?max_results=1 to ensure that the returned labels included languages in the right format

Screenshots (if applicable)

image

Fixes #4017

Fix language label generation.
id__in=base_queryset.exclude(lang=None)
.values_list("lang_id", flat=True)
.distinct()
).values("id", "native_name")
Copy link
Member

Choose a reason for hiding this comment

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

I believe you can do something like lang_name="native_name" but this works

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh yeah, will update!

@rtibbles rtibbles merged commit add9fab into learningequality:unstable Apr 12, 2023
@rtibbles rtibbles deleted the lang_field_name branch April 12, 2023 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants