Skip to content

Commit

Permalink
Log user deletion event
Browse files Browse the repository at this point in the history
  • Loading branch information
nas-tabchiche committed Feb 19, 2024
1 parent e2d3caf commit f04fd00
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions backend/iam/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,10 @@ class Meta:
# swappable = 'AUTH_USER_MODEL'
permissions = (("backup", "backup"), ("restore", "restore"))

def delete(self, *args, **kwargs):
super().delete(*args, **kwargs)
logger.info("user deleted", user=self)

def __str__(self):
return (
f"{self.first_name} {self.last_name}"
Expand Down

0 comments on commit f04fd00

Please sign in to comment.