fix: convert list items to strings before exclude check is performed (#9)

This commit is contained in:
Robert Kaussow 2021-06-13 17:34:30 +02:00 committed by GitHub
parent 75cfc01e80
commit 5892717729
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -75,7 +75,7 @@ class Config():
},
"exclude_vmid": {
"default": [],
"env": "EXCLUDE_STATE",
"env": "EXCLUDE_VMID",
"file": True,
"type": environs.Env().list
},

View File

@ -124,10 +124,10 @@ class Discovery():
if obj["template"] == 1:
continue
if obj["status"] in self.config.config["exclude_state"]:
if obj["status"] in map(str, self.config.config["exclude_state"]):
continue
if obj["vmid"] in self.config.config["exclude_vmid"]:
if obj["vmid"] in map(str, self.config.config["exclude_vmid"]):
continue
filtered.append(item.copy())