Ejemplo n.º 1
0
    def soft_delete(self):
        from corehq.messaging.scheduling.tasks import delete_timed_schedule_instances

        with transaction.atomic():
            self.deleted = True
            self.save()
            self.schedule.deleted = True
            self.schedule.save()
            delete_timed_schedule_instances.delay(self.schedule_id)
Ejemplo n.º 2
0
    def soft_delete(self):
        from corehq.messaging.scheduling.tasks import delete_timed_schedule_instances

        with transaction.atomic():
            self.deleted = True
            self.save()
            self.schedule.deleted = True
            self.schedule.save()
            delete_timed_schedule_instances.delay(self.schedule_id)