Skip to content

Commit

Permalink
Fix return type of SoftDeletableQuerySetMixin.delete()
Browse files Browse the repository at this point in the history
I don't know whether returning "nothing was deleted" is the best
option, but at least the returned value now has the correct type.

#541
  • Loading branch information
mthuurne committed Mar 17, 2023
1 parent 30de857 commit b2269e7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions model_utils/managers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit b2269e7

Please sign in to comment.