From c6a708077699d3413471289a58dd1a9589934ca5 Mon Sep 17 00:00:00 2001 From: Aevann Date: Mon, 28 Oct 2024 23:03:02 +0300 Subject: [PATCH] wpd cant handle the alt graph --- files/routes/routehelpers.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/files/routes/routehelpers.py b/files/routes/routehelpers.py index c22c60184..1e6bed68c 100644 --- a/files/routes/routehelpers.py +++ b/files/routes/routehelpers.py @@ -32,6 +32,10 @@ def validate_formkey(u, formkey): @cache.memoize(timeout=86400) def get_alt_graph_ids(uid): + if SITE_NAME == 'WPD': + alts = g.db.query(Alt.user1).filter_by(user2=uid).all() + g.db.query(Alt.user2).filter_by(user1=uid).all() + return {x[0] for x in alts} + alt_graph_cte = g.db.query(literal(uid).label('user_id')).select_from(Alt).cte('alt_graph', recursive=True) alt_graph_cte_inner = g.db.query(