Skip to content

Commit

Permalink
changed save model function & regionalize
Browse files Browse the repository at this point in the history
  • Loading branch information
melinoix committed Jan 28, 2025
1 parent b4be125 commit 4996d56
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions backend/core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1867,6 +1867,8 @@ def save(self, *args, **kwargs):
self.category = self.reference_control.category
if self.reference_control and self.csf_function is None:
self.csf_function = self.reference_control.csf_function
if self.status == "active":
self.progress_field = 100
super(AppliedControl, self).save(*args, **kwargs)

@property
Expand Down
3 changes: 2 additions & 1 deletion frontend/messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1140,5 +1140,6 @@
"maxRadius": "Max Radius",
"greenZoneRadius": "Green zone radius",
"yellowZoneRadius": "Yellow zone radius",
"redZoneRadius": "Red zone radius"
"redZoneRadius": "Red zone radius",
"progressField": "Progress"
}
3 changes: 2 additions & 1 deletion frontend/messages/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -1139,5 +1139,6 @@
"maxRadius": "Rayon maximal",
"greenZoneRadius": "Rayon de la zone verte",
"yellowZoneRadius": "Rayon de la zone jaune",
"redZoneRadius": "Rayon de la zone rouge"
"redZoneRadius": "Rayon de la zone rouge",
"progressField": "Progrès"
}

0 comments on commit 4996d56

Please sign in to comment.