Skip to content

Commit

Permalink
typing
Browse files Browse the repository at this point in the history
  • Loading branch information
pablodanswer committed Oct 22, 2024
1 parent 97f2463 commit 46436ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/danswer/db/notification.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def get_notification_by_id(
if not notif:
raise ValueError(f"No notification found with id {notification_id}")
if notif.user_id != user_id and not (
notif.user_id is None and user.role == UserRole.ADMIN
notif.user_id is None and user is not None and user.role == UserRole.ADMIN
):
raise PermissionError(
f"User {user_id} is not authorized to access notification {notification_id}"
Expand Down

0 comments on commit 46436ae

Please sign in to comment.