Skip to content

Commit

Permalink
Manage Policy model save
Browse files Browse the repository at this point in the history
  • Loading branch information
nas-tabchiche committed Feb 14, 2024
1 parent 4a053dc commit 2e927d8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions backend/core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -836,6 +836,10 @@ class Meta:

objects = SecurityMeasure.objects.filter(category="policy")

def save(self, *args, **kwargs):
self.category = "policy"
super(Policy, self).save(*args, **kwargs)


class RiskScenario(AbstractBaseModel, NameDescriptionMixin):
TREATMENT_OPTIONS = [
Expand Down

0 comments on commit 2e927d8

Please sign in to comment.