def delete_published_content_in_elasticsearch(sender, instance, **kwargs): """Catch the pre_delete signal to ensure the deletion in ES. Also, handle the deletion of the corresponding chapters. """ index_manager = ESIndexManager(**settings.ES_SEARCH_INDEX) if index_manager.index_exists: index_manager.delete_by_query(FakeChapter.get_es_document_type(), ES_Q('match', _routing=instance.es_id)) return delete_document_in_elasticsearch(instance)
def delete_post_in_elasticsearch(sender, instance, **kwargs): """catch the pre_delete signal to ensure the deletion in ES""" return delete_document_in_elasticsearch(instance)
def delete_post_in_elasticsearch(sender, instance, **kwargs): """catch the pre_delete signal to ensure the deletion in ES""" return delete_document_in_elasticsearch(instance)