Exemple #1
0
 def notify_related(self):
     # Trigger save() on related objects that depend on this account
     for rel in self._meta.get_all_related_objects():
         source = getattr(rel, 'related_model', rel.model)
         if source in services and hasattr(source, 'active'):
             for obj in getattr(self, rel.get_accessor_name()).all():
                 OperationsMiddleware.collect(Operation.SAVE, instance=obj, update_fields=[])
Exemple #2
0
 def notify_related(self):
     """ Trigger save() on related objects that depend on this account """
     for obj in self.get_services_to_disable():
         OperationsMiddleware.collect(Operation.SAVE, instance=obj, update_fields=())