fix diskchecks validation

This commit is contained in:
wh1te909 2020-05-30 19:03:03 +00:00
parent d80dd23742
commit c42ca066ec
1 changed files with 1 additions and 1 deletions

View File

@ -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: