mirror of
https://github.com/titanscouting/tra-superscript.git
synced 2024-12-30 19:39:09 +00:00
fixed pit data fetching
This commit is contained in:
parent
028f6f775d
commit
d017ec52a7
@ -52,9 +52,16 @@ def get_metrics_data_formatted(client, competition):
|
|||||||
|
|
||||||
def get_pit_data_formatted(client, competition):
|
def get_pit_data_formatted(client, competition):
|
||||||
x=requests.get("https://titanscouting.epochml.org/api/fetchAllTeamNicknamesAtCompetition?competition="+competition)
|
x=requests.get("https://titanscouting.epochml.org/api/fetchAllTeamNicknamesAtCompetition?competition="+competition)
|
||||||
output = x.json()
|
x = x.json()
|
||||||
data = output['data']
|
x = x['data']
|
||||||
return list(data.keys())
|
x = x.keys()
|
||||||
|
out = {}
|
||||||
|
for i in x:
|
||||||
|
try:
|
||||||
|
out[int(i)] = get_team_pit_data(client, competition, int(i))
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
return out
|
||||||
|
|
||||||
def get_pit_variable_data(client, competition):
|
def get_pit_variable_data(client, competition):
|
||||||
db = client.data_processing
|
db = client.data_processing
|
||||||
|
Loading…
Reference in New Issue
Block a user