From c42ca066ece519dca093e28a5bc7b44736c9a26d Mon Sep 17 00:00:00 2001 From: wh1te909 Date: Sat, 30 May 2020 19:03:03 +0000 Subject: [PATCH] fix diskchecks validation --- api/tacticalrmm/checks/serializers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/tacticalrmm/checks/serializers.py b/api/tacticalrmm/checks/serializers.py index 95052bf5..57538477 100644 --- a/api/tacticalrmm/checks/serializers.py +++ b/api/tacticalrmm/checks/serializers.py @@ -37,7 +37,7 @@ class CheckSerializer(serializers.ModelSerializer): # disk checks # make sure no duplicate diskchecks exist for an agent/policy if check_type == "diskspace" and not self.instance: # only on create - checks = Check.objects.filter(**self.context) + checks = Check.objects.filter(**self.context).filter(check_type="diskspace") if checks: for check in checks: if val["disk"] in check.disk: