Skip to content

Commit

Permalink
fix: remove collection-entity through model post_delete signal handler
Browse files Browse the repository at this point in the history
The indexing update is already handled by m2m_changed handler.
  • Loading branch information
navinkarkera committed Oct 10, 2024
1 parent 86b8cdd commit cd9eec9
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions openedx/core/djangoapps/content_libraries/signal_handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
"""
Expand Down

0 comments on commit cd9eec9

Please sign in to comment.