Skip to content

Commit

Permalink
Fixed deleted_at field definition. (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
emorozov committed Jul 1, 2020
1 parent 4e99349 commit 616d146
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion softdelete/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,10 @@ def filter(self, *args, **kwargs):


class SoftDeleteObject(models.Model):
deleted_at = models.DateTimeField(blank=True, null=True, default=None)
deleted_at = models.DateTimeField(
blank=True, null=True, default=None,
editable=False, db_index=True
)
objects = SoftDeleteManager()

class Meta:
Expand Down

0 comments on commit 616d146

Please sign in to comment.