File tree Expand file tree Collapse file tree
openedx/core/djangoapps/content_libraries Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -276,6 +276,8 @@ def send_collections_changed_events(
276276 """
277277 Sends a CONTENT_OBJECT_ASSOCIATIONS_CHANGED event for each modified library
278278 entity in the given list, because their associated collections have changed.
279+ This is dispatched in response to a COLLECTION_CHANGED event, usually
280+ because entities have been added to or removed from a collection.
279281
280282 ⏳ This task is designed to be run asynchronously so it can handle many
281283 entities, but you can also call it synchronously if you are only
@@ -287,6 +289,8 @@ def send_collections_changed_events(
287289 entities = (
288290 content_api .get_publishable_entities (learning_package_id )
289291 .filter (id__in = publishable_entity_ids )
292+ # Ignore deleted items (both draft & published are deleted) that are still associated with the collection:
293+ .exclude (draft__version = None , published__version = None )
290294 .select_related ("component" , "container" )
291295 )
292296
You can’t perform that action at this time.
0 commit comments