コード例 #1
0
    def post_delete(self, sender, document, **kwargs):
        """
        Post delete hook handler

        - De-index group from elasticsearch
        """
        es_document_deindex.delay(document)
コード例 #2
0
    def post_delete(self, sender, document, **kwargs):
        """
        Post delete hook handler

        - De-index group from elasticsearch
        """
        es_document_deindex.delay(document)
コード例 #3
0
ファイル: item.py プロジェクト: tcpr1/vosae-app
    def post_delete(self, sender, document, **kwargs):
        """
        Post save hook handler

        - De-index item from elasticsearch
        """
        # De-index item from elasticsearch
        es_document_deindex.delay(document)
コード例 #4
0
ファイル: item.py プロジェクト: FacturaVirtual/vosae-app
    def post_delete(self, sender, document, **kwargs):
        """
        Post save hook handler

        - De-index item from elasticsearch
        """
        # De-index item from elasticsearch
        es_document_deindex.delay(document)
コード例 #5
0
ファイル: entity.py プロジェクト: tcpr1/vosae-app
    def post_delete(self, sender, document, **kwargs):
        """
        Post delete hook handler

        - Deletes related photo, if exists
        - De-index entity from elasticsearch
        """
        # Deletes related photo, if exists
        if document.photo:
            document.photo.delete()

        # De-index entity from elasticsearch
        es_document_deindex.delay(document)
コード例 #6
0
ファイル: invoice_base.py プロジェクト: snower2014/vosae-app
    def post_delete(self, sender, document, **kwargs):
        """
        Post delete hook handler

        - Deletes related attachments, if exists
        - De-index invoice based document from elasticsearch
        - Removes timeline and notification entries
        """
        # Deletes related attachments, if exists
        for attachment in document.attachments:
            attachment.delete()

        # De-index invoice based document from elasticsearch
        es_document_deindex.delay(document)

        # Removes timeline and notification entries
        invoicebase_deleted_task.delay(document)
コード例 #7
0
ファイル: invoice_base.py プロジェクト: tcpr1/vosae-app
    def post_delete(self, sender, document, **kwargs):
        """
        Post delete hook handler

        - Deletes related attachments, if exists
        - De-index invoice based document from elasticsearch
        - Removes timeline and notification entries
        """
        # Deletes related attachments, if exists
        for attachment in document.attachments:
            attachment.delete()

        # De-index invoice based document from elasticsearch
        es_document_deindex.delay(document)

        # Removes timeline and notification entries
        invoicebase_deleted_task.delay(document)
コード例 #8
0
ファイル: vosae_user.py プロジェクト: peicheng/vosae-app
    def post_delete(self, sender, document, **kwargs):
        """
        Post delete hook handler

        - Removes the django user from the django group
        - De-index user from elasticsearch
        """
        from django.contrib.auth.models import Group
        UserModel = get_user_model()

        # Removes the django user from the django group
        user = UserModel._default_manager.get(email=document.email)
        group = Group.objects.get(name=document.tenant.slug)
        group.user_set.remove(user)
        group.save()

        # De-index document from Elastic Search
        es_document_deindex.delay(document)
コード例 #9
0
ファイル: vosae_user.py プロジェクト: peicheng/vosae-app
    def post_delete(self, sender, document, **kwargs):
        """
        Post delete hook handler

        - Removes the django user from the django group
        - De-index user from elasticsearch
        """
        from django.contrib.auth.models import Group
        UserModel = get_user_model()

        # Removes the django user from the django group
        user = UserModel._default_manager.get(email=document.email)
        group = Group.objects.get(name=document.tenant.slug)
        group.user_set.remove(user)
        group.save()

        # De-index document from Elastic Search
        es_document_deindex.delay(document)