From 6518a91c9c1cb491ba398d9f60ef65e740ed1ef6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=B4mulo=20Penido?= Date: Thu, 15 Feb 2024 17:29:00 -0300 Subject: [PATCH] refactor: changing condition checking --- .../content_tagging/rest_api/v1/objecttag_export_helpers.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/openedx/core/djangoapps/content_tagging/rest_api/v1/objecttag_export_helpers.py b/openedx/core/djangoapps/content_tagging/rest_api/v1/objecttag_export_helpers.py index 51cecc3ffa5a..de98b21cf89e 100644 --- a/openedx/core/djangoapps/content_tagging/rest_api/v1/objecttag_export_helpers.py +++ b/openedx/core/djangoapps/content_tagging/rest_api/v1/objecttag_export_helpers.py @@ -61,12 +61,8 @@ def get_course_tagged_object_and_children( object_tags=object_tag_cache.get(course_id, {}), children=None, ) - if course.has_children: - children = course.children - else: - children = [] - return tagged_course, children + return tagged_course, course.children if course.has_children else [] def get_library_tagged_object_and_children(