From 3316391e9841ba765ed5f8e0362e20ac622ef4af Mon Sep 17 00:00:00 2001 From: Miguel Caballer Date: Fri, 13 Dec 2024 09:02:49 +0100 Subject: [PATCH] Fix error --- app/utils.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/utils.py b/app/utils.py index a2a1416b..f6bb7587 100644 --- a/app/utils.py +++ b/app/utils.py @@ -986,5 +986,11 @@ def merge_templates(template, new_template): def get_cache_creds(session, cred, userid, enabled=None): if "creds" not in session: - session["creds"] = cred.get_creds(userid, enabled) - return session["creds"] + session["creds"] = cred.get_creds(userid) + + res = [] + for cred in session["creds"]: + if enabled is None or enabled == cred['enabled']: + res.append(cred) + + return res