(self, instance, **kwargs)
Update docs that have related_models.
Update docs that have related_models.
Update docs that have related_models .
def update_related(self, instance, **kwargs):
        """
        Update docs that have related_models.
        """
        if not DEDConfig.autosync_enabled():
            return

        for doc in self._get_related_doc(instance):
            doc_instance = doc()
            try:
                related = doc_instance.get_instances_from_related(instance)
            except ObjectDoesNotExist:
                related = None

            if related is not None:
                doc_instance.update(related, **kwargs)
def update_related ( self , instance , * * kwargs ) : if not DEDConfig . autosync_enabled ( ) : return for doc in self . _get_related_doc ( instance ) : doc_instance = doc ( ) try : related = doc_instance . get_instances_from_related ( instance ) except ObjectDoesNotExist : related = None if related is not None : doc_instance . update ( related , * * kwargs )