Skip to content

Commit 78b2e71

Browse files
authored
Update comment.py
1 parent 2589097 commit 78b2e71

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

rating_api/routes/comment.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ async def get_comments(
200200
if user and "rating.comment.review" in [scope['name'] for scope in user.get('session_scopes')]:
201201
result = CommentGetAllWithAllInfo(limit=limit, offset=offset, total=len(comments))
202202
comment_validator = CommentGetWithAllInfo
203-
elif user.get('id') == user_id:
203+
elif user and user.get('id') == user_id:
204204
result = CommentGetAllWithStatus(limit=limit, offset=offset, total=len(comments))
205205
comment_validator = CommentGetWithStatus
206206
else:

0 commit comments

Comments
 (0)