fix diskchecks validation
This commit is contained in:
parent
d80dd23742
commit
c42ca066ec
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue