feat: add warning when someone is interested

This commit is contained in:
2025-07-30 06:51:29 +02:00
parent d921623f31
commit f25c425d85
3 changed files with 41 additions and 14 deletions

View File

@@ -496,6 +496,12 @@ class AdoptionNotice(models.Model):
return False
return self.adoptionnoticestatus.is_closed
@property
def is_interested(self):
if not hasattr(self, 'adoptionnoticestatus'):
return False
return self.adoptionnoticestatus.is_interested
@property
def is_disabled_unchecked(self):
if not hasattr(self, 'adoptionnoticestatus'):
@@ -609,6 +615,10 @@ class AdoptionNoticeStatus(models.Model):
def is_closed(self):
return self.major_status == self.CLOSED
@property
def is_interested(self):
return self.major_status == self.ACTIVE and self.minor_status == "interested"
@property
def is_disabled_unchecked(self):
return self.major_status == self.DISABLED and self.minor_status == "unchecked"