Skip to content

Commit a2b3600

Browse files
Kumzycofin
authored andcommitted
add docstring to the restore method
1 parent 17b59e5 commit a2b3600

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

advanced_alchemy/mixins/softdelete.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,9 @@ def set_deleted_at(self, timestamp: datetime | None = None) -> None:
3535
self.deleted_at = timestamp or datetime.now(timezone.utc)
3636

3737
def restore(self) -> None:
38+
"""Restore a soft-deleted record by clearing the deleted_at timestamp.
39+
40+
This method undeletes a previously soft-deleted record by setting the deleted_at
41+
field to None, making it visible in normal queries again.
42+
"""
3843
self.deleted_at = None

0 commit comments

Comments
 (0)