comment
This commit is contained in:
parent
68fce283bc
commit
8a824d3d23
|
@ -44,7 +44,7 @@ def login_required(f):
|
||||||
if not is_authenticated:
|
if not is_authenticated:
|
||||||
raise Exception("You are not logged in")
|
raise Exception("You are not logged in")
|
||||||
else:
|
else:
|
||||||
# Добавляем author_id в контекст
|
# Добавляем author_id и user_id в контекст
|
||||||
with local_session() as session:
|
with local_session() as session:
|
||||||
author = session.query(Author).filter(Author.user == user_id).first()
|
author = session.query(Author).filter(Author.user == user_id).first()
|
||||||
if author:
|
if author:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user