Skip to content

Commit

Permalink
Fix typo in cookbook (exclude instead of filter)
Browse files Browse the repository at this point in the history
Type: trivial
  • Loading branch information
peterthomassen authored and Wes Kendall committed Nov 26, 2023
1 parent df27598 commit 3714c08
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions docs/cookbook.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,7 @@ class NotDeletedManager(models.Manager):
"""Automatically filters out soft deleted objects from QuerySets"""

def get_queryset(self):
return (
super(NotDeletedManager, self)
.get_queryset()
.filter(is_active=False)
)
return super().get_queryset().exclude(is_active=False)

class SoftDeleteModel(models.Model):
# This field is set to false when the model is deleted
Expand Down

0 comments on commit 3714c08

Please sign in to comment.