main fix
This commit is contained in:
parent
01105b5653
commit
fa657bd13f
7
main.py
7
main.py
@ -81,13 +81,14 @@ class ConfigValidator:
|
|||||||
# Validate 'companyBlacklist'
|
# Validate 'companyBlacklist'
|
||||||
company_blacklist = parameters.get('companyBlacklist', [])
|
company_blacklist = parameters.get('companyBlacklist', [])
|
||||||
if not isinstance(company_blacklist, list) or not all(isinstance(comp, str) for comp in company_blacklist):
|
if not isinstance(company_blacklist, list) or not all(isinstance(comp, str) for comp in company_blacklist):
|
||||||
raise ConfigError(f"'companyBlacklist' must be a list of strings in config file {config_yaml_path}.")
|
company_blacklist = []
|
||||||
|
parameters['companyBlacklist'] = company_blacklist
|
||||||
|
|
||||||
# Validate 'titleBlacklist'
|
# Validate 'titleBlacklist'
|
||||||
title_blacklist = parameters.get('titleBlacklist', [])
|
title_blacklist = parameters.get('titleBlacklist', [])
|
||||||
if not isinstance(title_blacklist, list) or not all(isinstance(word, str) for word in title_blacklist):
|
if not isinstance(title_blacklist, list) or not all(isinstance(word, str) for word in title_blacklist):
|
||||||
raise ConfigError(f"'titleBlacklist' must be a list of strings in config file {config_yaml_path}.")
|
title_blacklist = []
|
||||||
|
parameters['titleBlacklist'] = title_blacklist
|
||||||
return parameters
|
return parameters
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
Loading…
Reference in New Issue
Block a user