mirror of
https://github.com/titanscouting/tra-superscript.git
synced 2024-11-09 22:44:44 +00:00
added working validate_config for Match module
Signed-off-by: Arthur Lu <learthurgo@gmail.com>
This commit is contained in:
parent
4a1d7f0db1
commit
b9e2de2dc6
@ -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