This commit is contained in:
@@ -62,10 +62,11 @@ def login_required(f):
|
||||
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:
|
||||
context["author_id"] = author["id"]
|
||||
if cached_authors:
|
||||
authors_by_user, authors_by_id = cached_authors
|
||||
author = authors_by_user.get(user_id)
|
||||
if author and "id" in author:
|
||||
context["author_id"] = author["id"]
|
||||
return await f(*args, **kwargs)
|
||||
|
||||
return decorated_function
|
||||
|
Reference in New Issue
Block a user