fixed pit data fetching

Former-commit-id: d017ec52a7
This commit is contained in:
Arthur Lu 2022-02-04 03:24:47 +00:00
parent c46e74036b
commit c4bb633e08

View File

@ -52,9 +52,16 @@ def get_metrics_data_formatted(client, competition):
def get_pit_data_formatted(client, competition):
x=requests.get("https://titanscouting.epochml.org/api/fetchAllTeamNicknamesAtCompetition?competition="+competition)
output = x.json()
data = output['data']
return list(data.keys())
x = x.json()
x = x['data']
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):
db = client.data_processing