Skip to content

Commit

Permalink
trigger policy refresh on more fields
Browse files Browse the repository at this point in the history
  • Loading branch information
wh1te909 committed Jul 17, 2024
1 parent 0b4fff9 commit 9c36f2c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion api/tacticalrmm/agents/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,12 @@ def save(self, *args, **kwargs):
orig = Agent.objects.get(pk=self.pk)
mon_type_changed = self.monitoring_type != orig.monitoring_type
site_changed = self.site_id != orig.site_id
if mon_type_changed or site_changed:
policy_changed = self.policy != orig.policy
block_inherit = (
self.block_policy_inheritance != orig.block_policy_inheritance
)

if mon_type_changed or site_changed or policy_changed or block_inherit:
self._processing_set_alert_template = True
self.set_alert_template()
self._processing_set_alert_template = False
Expand Down

0 comments on commit 9c36f2c

Please sign in to comment.