mirror of
https://github.com/titanscouting/tra-superscript.git
synced 2024-12-30 19:39:09 +00:00
added working validate_config for Match module
Signed-off-by: Arthur Lu <learthurgo@gmail.com>
Former-commit-id: b9e2de2dc6
This commit is contained in:
parent
36081e1239
commit
07965cba4b
@ -32,7 +32,18 @@ class Match:
|
||||
self.teams = teams
|
||||
|
||||
def validate_config(self):
|
||||
return True
|
||||
if self.config == None:
|
||||
return "config cannot be empty"
|
||||
elif self.apikey == None or self.apikey == "":
|
||||
return "apikey cannot be empty"
|
||||
elif self.tbakey == None or self.tbakey == "":
|
||||
return "tbakey cannot be empty"
|
||||
elif not(self.config["scope"] in ["competition", "season", "none"]):
|
||||
return "scope must be one of: (competition, season, none)"
|
||||
elif not(self.config["agglomeration"] in ["none", "mean"]):
|
||||
return "agglomeration must be one of: (none, mean)"
|
||||
else:
|
||||
return None
|
||||
|
||||
def load_data(self):
|
||||
pass
|
||||
|
Loading…
Reference in New Issue
Block a user