mirror of
https://github.com/titanscouting/tra-superscript.git
synced 2024-11-10 06:54:45 +00:00
modified config validation for Match module
Signed-off-by: Arthur Lu <learthurgo@gmail.com>
This commit is contained in:
parent
f40939d69d
commit
de81a03e3d
@ -36,7 +36,6 @@ class Match:
|
||||
self.teams = teams
|
||||
|
||||
def validate_config(self):
|
||||
return True, ""
|
||||
"""
|
||||
if self.config == None:
|
||||
return False, "config cannot be empty"
|
||||
@ -46,8 +45,10 @@ class Match:
|
||||
return False, "tbakey cannot be empty"
|
||||
elif not(self.config["scope"] in ["competition", "season", "none"]):
|
||||
return False, "scope must be one of: (competition, season, none)"
|
||||
elif not(self.config["agglomeration"] in ["none", "mean"]):
|
||||
return False, "agglomeration must be one of: (none, mean)"
|
||||
elif self.config["agglomeration"] != "none":
|
||||
return False, "agglomeration must be 'none', there are currently no supported Agglomeration methods"
|
||||
elif self.config["tests"] == None:
|
||||
return False, "tests must not be None, it may be empty {}"
|
||||
else:
|
||||
return True, ""
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user