From cd9eec97e1d28929e8e9ceb6e8be6de83ab9dc60 Mon Sep 17 00:00:00 2001 From: Navin Karkera Date: Thu, 10 Oct 2024 11:50:26 +0530 Subject: [PATCH] fix: remove collection-entity through model post_delete signal handler The indexing update is already handled by m2m_changed handler. --- .../djangoapps/content_libraries/signal_handlers.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/openedx/core/djangoapps/content_libraries/signal_handlers.py b/openedx/core/djangoapps/content_libraries/signal_handlers.py index 18e102bf686d..1d723bea8b23 100644 --- a/openedx/core/djangoapps/content_libraries/signal_handlers.py +++ b/openedx/core/djangoapps/content_libraries/signal_handlers.py @@ -162,16 +162,6 @@ def library_collection_entity_saved(sender, instance, created, **kwargs): _library_collection_component_changed(component) -@receiver(post_delete, sender=CollectionPublishableEntity, dispatch_uid="library_collection_entity_deleted") -def library_collection_entity_deleted(sender, instance, **kwargs): - """ - Sends a CONTENT_OBJECT_ASSOCIATIONS_CHANGED event for components removed from a collection. - """ - # Component.pk matches its entity.pk - component = get_component(instance.entity_id) - _library_collection_component_changed(component) - - @receiver(m2m_changed, sender=CollectionPublishableEntity, dispatch_uid="library_collection_entities_changed") def library_collection_entities_changed(sender, instance, action, pk_set, **kwargs): """