Skip to content

Commit

Permalink
add types and remove property from is_edited
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuadavidthomas committed Jan 12, 2024
1 parent 4c9fc9b commit d824580
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/django_twc_toolbox/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class TimeStamped(models.Model):
class Meta:
abstract = True

def save(self, *args, **kwargs):
def save(self, *args, **kwargs) -> None:
"""
Overriding the save method in order to make sure that
modified field is updated even if it is not given as
Expand All @@ -59,6 +59,5 @@ def save(self, *args, **kwargs):

super().save(*args, **kwargs)

@property
def is_edited(self):
def is_edited(self) -> bool:
return self.created_at != self.updated_at

0 comments on commit d824580

Please sign in to comment.