Skip to content

Commit

Permalink
temp: hack to turn off waffle warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
kdmccormick committed Oct 18, 2024
1 parent 23c4276 commit 9fadca2
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions openedx/core/djangoapps/content_tagging/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@
log = logging.getLogger(__name__)


def tru(*args, **kwargs):
return False


@receiver(COURSE_CREATED)
def auto_tag_course(**kwargs):
"""
Expand All @@ -47,7 +51,7 @@ def auto_tag_course(**kwargs):
log.error("Received null or incorrect data for event")
return

if not CONTENT_TAGGING_AUTO.is_enabled(course_data.course_key):
if not tru(course_data.course_key):
return

update_course_tags.delay(str(course_data.course_key))
Expand All @@ -64,7 +68,7 @@ def auto_tag_xblock(**kwargs):
log.error("Received null or incorrect data for event")
return

if not CONTENT_TAGGING_AUTO.is_enabled(xblock_info.usage_key.course_key):
if not tru(xblock_info.usage_key.course_key):
return

if xblock_info.block_type == 'course_info':
Expand All @@ -89,7 +93,7 @@ def delete_tag_xblock(**kwargs):
log.error("Received null or incorrect data for event")
return

if not CONTENT_TAGGING_AUTO.is_enabled(xblock_info.usage_key.course_key):
if not tru(xblock_info.usage_key.course_key):
return

if xblock_info.block_type == "course":
Expand All @@ -105,7 +109,7 @@ def auto_tag_library_block(**kwargs):
"""
Automatically tag Library Blocks based on metadata
"""
if not CONTENT_TAGGING_AUTO.is_enabled():
if not tru():
return

library_block_data = kwargs.get("library_block", None)
Expand Down

0 comments on commit 9fadca2

Please sign in to comment.