From 4e1fcd702b9cdfc764063d26a843f2d58bc76b6f Mon Sep 17 00:00:00 2001 From: Luis Felipe Castano Date: Wed, 28 Feb 2024 18:59:13 -0500 Subject: [PATCH] fix: quality checks --- lms/djangoapps/discussion/rest_api/api.py | 5 +++-- openedx/core/djangoapps/discussions/utils.py | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lms/djangoapps/discussion/rest_api/api.py b/lms/djangoapps/discussion/rest_api/api.py index 70f2f876a2..34521c8b86 100644 --- a/lms/djangoapps/discussion/rest_api/api.py +++ b/lms/djangoapps/discussion/rest_api/api.py @@ -1354,8 +1354,9 @@ def _handle_abuse_flagged_field(form_value, user, cc_content, request): if form_value: cc_content.flagAbuse(user, cc_content) track_discussion_reported_event(request, course, cc_content) - if ENABLE_DISCUSSIONS_MFE.is_enabled(course_key) and use_discussions_mfe(course.org) and reported_content_email_notification_enabled( - course_key): + if ENABLE_DISCUSSIONS_MFE.is_enabled(course_key) and use_discussions_mfe( + course.org) and reported_content_email_notification_enabled( + course_key): if cc_content.type == 'thread': thread_flagged.send(sender='flag_abuse_for_thread', user=user, post=cc_content) else: diff --git a/openedx/core/djangoapps/discussions/utils.py b/openedx/core/djangoapps/discussions/utils.py index 6af8811aec..8fd8807c2a 100644 --- a/openedx/core/djangoapps/discussions/utils.py +++ b/openedx/core/djangoapps/discussions/utils.py @@ -202,8 +202,8 @@ def use_discussions_mfe(org) -> bool: True if the MFE setting is activated, by default the MFE is deactivated """ - use_discussions_mfe = configuration_helpers.get_value_for_org( + use_discussions = configuration_helpers.get_value_for_org( org, "USE_DISCUSSIONS_MFE_FRONTEND", False ) - return bool(use_discussions_mfe) \ No newline at end of file + return bool(use_discussions)