Skip to content

Commit df8c5cd

Browse files
authored
Merge pull request #190 from openedx/modify-queryset
feat: modify queryset from prefetch to select related
2 parents 410940a + 048e8b8 commit df8c5cd

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

CHANGELOG.rst

+4
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ Change Log
1313
1414
Unreleased
1515

16+
[1.46.1] - 2024-01-05
17+
---------------------
18+
* feat: Modify prefetch related to select related for whitelisted product skills.
19+
1620
[1.46.0] - 2023-10-23
1721
---------------------
1822
* feat: Removed direct usages of JobSkills and IndustryJobSkills objects in favour of whitelisted or blacklisted query sets.

taxonomy/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@
1515
# 2. MINOR version when you add functionality in a backwards compatible manner, and
1616
# 3. PATCH version when you make backwards compatible bug fixes.
1717
# More details can be found at https://semver.org/
18-
__version__ = '1.46.0'
18+
__version__ = '1.46.1'
1919

2020
default_app_config = 'taxonomy.apps.TaxonomyConfig' # pylint: disable=invalid-name

taxonomy/utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def get_whitelisted_serialized_skills(key_or_uuid, product_type=ProductTypes.Cou
6464
return cached_response.value
6565

6666
whitelisted_product_skills = get_whitelisted_product_skills(key_or_uuid, product_type)
67-
product_skills = whitelisted_product_skills.prefetch_related('skill__category', 'skill__subcategory')
67+
product_skills = whitelisted_product_skills.select_related('skill__category', 'skill__subcategory')
6868
skills = [product_skill.skill for product_skill in product_skills]
6969
skills_data = SkillSerializer(skills, many=True).data
7070
TieredCache.set_all_tiers(

0 commit comments

Comments
 (0)