From 2658cd323b4742f34996feb9daaab537ed9e58c6 Mon Sep 17 00:00:00 2001 From: Untone Date: Tue, 19 Dec 2023 19:26:15 +0300 Subject: [PATCH] cached-request-6 --- services/auth.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/services/auth.py b/services/auth.py index d76d71e..1340b9c 100644 --- a/services/auth.py +++ b/services/auth.py @@ -60,6 +60,8 @@ def login_required(f): user_id = await check_auth(req) if user_id: context["user_id"] = user_id + if not cached_authors: + get_all_authors() authors_by_user, authors_by_id = cached_authors author = authors_by_user.get(user_id) if author and "id" in author: