Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ def post(self, request: Request, user: User, interface_id: str) -> HttpResponse:

# Using `request.user` here because superuser/staff should not be able to set a user's 2fa
if user.id != request.user.id:
assert request.user.id is not None
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

annoying we have to do this as this in theory will never be possible, but only way to make the type checker happy.

user = User.objects.get(id=request.user.id)

# start activation
Expand Down
Loading