Skip to content

Commit 7056229

Browse files
committed
Add custom SLA calculation method to Finding model
1 parent fb49ecd commit 7056229

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

dojo/models.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3146,6 +3146,11 @@ def get_sla_configuration(self):
31463146
return self.test.engagement.product.sla_configuration
31473147

31483148
def get_sla_period(self):
3149+
# Determine which method to use to calculate the SLA
3150+
from dojo.utils import get_custom_method # noqa: PLC0415 circular import
3151+
if method := get_custom_method("FINDING_SLA_EXPIRATION_DATE"):
3152+
return method(self)
3153+
# Run the default method
31493154
sla_configuration = self.get_sla_configuration()
31503155
sla_period = getattr(sla_configuration, self.severity.lower(), None)
31513156
enforce_period = getattr(sla_configuration, str("enforce_" + self.severity.lower()), None)

0 commit comments

Comments
 (0)