diff --git a/openedx/core/djangoapps/content_libraries/api.py b/openedx/core/djangoapps/content_libraries/api.py index 8494e0cad33..11b720bbb97 100644 --- a/openedx/core/djangoapps/content_libraries/api.py +++ b/openedx/core/djangoapps/content_libraries/api.py @@ -1243,7 +1243,7 @@ def set_library_component_collections( created_by: int | None = None, # As an optimization, callers may pass in a pre-fetched ContentLibrary instance content_library: ContentLibrary | None = None, -) -> Collection: +) -> Component: """ It Associates the component with collections for the given collection keys. diff --git a/openedx/core/djangoapps/content_libraries/views.py b/openedx/core/djangoapps/content_libraries/views.py index 352ec6cc788..f81c977b776 100644 --- a/openedx/core/djangoapps/content_libraries/views.py +++ b/openedx/core/djangoapps/content_libraries/views.py @@ -655,8 +655,11 @@ def patch(self, request, usage_key_str) -> Response: Collection and Components must all be part of the given library/learning package. """ key = LibraryUsageLocatorV2.from_string(usage_key_str) - content_library = api.require_permission_for_library_key(key.lib_key, request.user, - permissions.CAN_EDIT_THIS_CONTENT_LIBRARY) + content_library = api.require_permission_for_library_key( + key.lib_key, + request.user, + permissions.CAN_EDIT_THIS_CONTENT_LIBRARY + ) component = api.get_component_from_usage_key(key) serializer = ContentLibraryComponentCollectionsUpdateSerializer(data=request.data) serializer.is_valid(raise_exception=True)