diff --git a/dojo/models.py b/dojo/models.py index 415bc6b4567..5de06d42743 100644 --- a/dojo/models.py +++ b/dojo/models.py @@ -3614,22 +3614,22 @@ class Risk_Acceptance(models.Model): TREATMENT_FIX = 'F' TREATMENT_TRANSFER = 'T' - TREATMENT_CHOICES = [ - (TREATMENT_ACCEPT, 'Accept (The risk is acknowledged, yet remains)'), - (TREATMENT_AVOID, 'Avoid (Do not engage with whatever creates the risk)'), - (TREATMENT_MITIGATE, 'Mitigate (The risk still exists, yet compensating controls make it less of a threat)'), - (TREATMENT_FIX, 'Fix (The risk is eradicated)'), - (TREATMENT_TRANSFER, 'Transfer (The risk is transferred to a 3rd party)'), - ] - TREATMENT_TRANSLATIONS = { - 'A': 'Accept (The risk is acknowledged, yet remains)', - 'V': 'Avoid (Do not engage with whatever creates the risk)', - 'M': 'Mitigate (The risk still exists, yet compensating controls make it less of a threat)', - 'F': 'Fix (The risk is eradicated)', - 'T': 'Transfer (The risk is transferred to a 3rd party)', + TREATMENT_ACCEPT: _('Accept (The risk is acknowledged, yet remains)'), + TREATMENT_AVOID: _('Avoid (Do not engage with whatever creates the risk)'), + TREATMENT_MITIGATE: _('Mitigate (The risk still exists, yet compensating controls make it less of a threat)'), + TREATMENT_FIX: _('Fix (The risk is eradicated)'), + TREATMENT_TRANSFER: _('Transfer (The risk is transferred to a 3rd party)'), } + TREATMENT_CHOICES = [ + (TREATMENT_ACCEPT, TREATMENT_TRANSLATIONS[TREATMENT_ACCEPT]), + (TREATMENT_AVOID, TREATMENT_TRANSLATIONS[TREATMENT_AVOID]), + (TREATMENT_MITIGATE, TREATMENT_TRANSLATIONS[TREATMENT_MITIGATE]), + (TREATMENT_FIX, TREATMENT_TRANSLATIONS[TREATMENT_FIX]), + (TREATMENT_TRANSFER, TREATMENT_TRANSLATIONS[TREATMENT_TRANSFER]), + ] + name = models.CharField(max_length=300, null=False, blank=False, help_text=_("Descriptive name which in the future may also be used to group risk acceptances together across engagements and products")) accepted_findings = models.ManyToManyField(Finding)