From e6ca2c17075110751e761f8b2cb8bdeee0ae17e1 Mon Sep 17 00:00:00 2001 From: XnpioChV Date: Fri, 13 Sep 2024 11:20:06 -0500 Subject: [PATCH] style: Fix lint --- openedx/core/djangoapps/content/search/handlers.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openedx/core/djangoapps/content/search/handlers.py b/openedx/core/djangoapps/content/search/handlers.py index fb3f9181a580..1605f8ebfd58 100644 --- a/openedx/core/djangoapps/content/search/handlers.py +++ b/openedx/core/djangoapps/content/search/handlers.py @@ -195,9 +195,10 @@ def content_object_associations_changed_handler(**kwargs) -> None: try: # Check if valid if course or library block - usage_key = UsageKey.from_string(str(content_object.object_id)) + usage_key = UsageKey.from_string(str(content_object.object_id)) except InvalidKeyError: try: + # Check if valid if library collection usage_key = LibraryCollectionLocator.from_string(str(content_object.object_id)) except InvalidKeyError: log.error("Received invalid content object id")