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>
Former-commit-id: de81a03e3d
This commit is contained in:
parent
66bf3a3a3e
commit
88282aa18b
@ -36,7 +36,6 @@ class Match:
|
|||||||
self.teams = teams
|
self.teams = teams
|
||||||
|
|
||||||
def validate_config(self):
|
def validate_config(self):
|
||||||
return True, ""
|
|
||||||
"""
|
"""
|
||||||
if self.config == None:
|
if self.config == None:
|
||||||
return False, "config cannot be empty"
|
return False, "config cannot be empty"
|
||||||
@ -46,8 +45,10 @@ class Match:
|
|||||||
return False, "tbakey cannot be empty"
|
return False, "tbakey cannot be empty"
|
||||||
elif not(self.config["scope"] in ["competition", "season", "none"]):
|
elif not(self.config["scope"] in ["competition", "season", "none"]):
|
||||||
return False, "scope must be one of: (competition, season, none)"
|
return False, "scope must be one of: (competition, season, none)"
|
||||||
elif not(self.config["agglomeration"] in ["none", "mean"]):
|
elif self.config["agglomeration"] != "none":
|
||||||
return False, "agglomeration must be one of: (none, mean)"
|
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:
|
else:
|
||||||
return True, ""
|
return True, ""
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user