From 007be5bf95e2fb2af2a66b8594ae2df5544f2ca4 Mon Sep 17 00:00:00 2001 From: sadnub Date: Thu, 23 Sep 2021 12:56:27 -0400 Subject: [PATCH] Stop DatabaseError exception when update_fields hasn't been changed --- api/tacticalrmm/checks/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/tacticalrmm/checks/models.py b/api/tacticalrmm/checks/models.py index b347d8bb..24d3f5ee 100644 --- a/api/tacticalrmm/checks/models.py +++ b/api/tacticalrmm/checks/models.py @@ -457,7 +457,7 @@ class Check(BaseAuditModel): elif self.status == "passing": self.fail_count = 0 - self.save(update_fields=["status", "fail_count", "alert_severity"]) + self.save() if Alert.objects.filter(assigned_check=self, resolved=False).exists(): Alert.handle_alert_resolve(self)