diff --git a/model_utils/managers.py b/model_utils/managers.py index 07154897..2b0a8527 100644 --- a/model_utils/managers.py +++ b/model_utils/managers.py @@ -260,6 +260,7 @@ def delete(self): field to True) """ self.update(is_removed=True) + return (0, {}) # no objects were actually deleted class SoftDeletableQuerySet(SoftDeletableQuerySetMixin, QuerySet): diff --git a/model_utils/models.py b/model_utils/models.py index a81f11df..9ba34e32 100644 --- a/model_utils/models.py +++ b/model_utils/models.py @@ -156,6 +156,7 @@ def delete(self, using=None, soft=True, *args, **kwargs): if soft: self.is_removed = True self.save(using=using) + return (0, {}) # no objects were actually deleted else: return super().delete(using=using, *args, **kwargs)