aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/risk_insight/views.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/python/risk_insight/views.py b/python/risk_insight/views.py
index 58171214..d0a1f7df 100644
--- a/python/risk_insight/views.py
+++ b/python/risk_insight/views.py
@@ -93,9 +93,10 @@ def get_indices_quotes():
@app.route("/tranches.html")
def tranches():
- with open(os.path.join(os.getenv("CODE_DIR"), "etc", "runs.yml")) as fh:
- config = yaml.load(fh)
- series_list = sorted(list(set([int(index[2:]) for index, tenor in config['runs']])))
+ db = get_db()
+ with db.cursor() as c:
+ c.execute("SELECT distinct series FROM risk_numbers ORDER BY series")
+ series_list = [s for s, in c]
return render_template("tranches.html", series=series_list)
@app.route("/indices.html")