rcwaterman commited on
Commit
a7ad842
1 Parent(s): 79c0f83

Fixing dcf tool

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -133,9 +133,9 @@ def get_dcf(ticker:str):
133
  # Check if the request was successful
134
  if response.status_code == 200:
135
  # Parse the response JSON
136
- dcf_data = response.json()
137
  # return the DCF data
138
- return dcf_data[0]["dcf"]
139
  else:
140
  # return the error message
141
  return f"Failed to retrieve data: {response.status_code}"
 
133
  # Check if the request was successful
134
  if response.status_code == 200:
135
  # Parse the response JSON
136
+ dcf_data = response.json()[0]
137
  # return the DCF data
138
+ return dcf_data["dcf"]
139
  else:
140
  # return the error message
141
  return f"Failed to retrieve data: {response.status_code}"