File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
gramps_webapi/api/resources Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -557,14 +557,17 @@ def get(self):
557557 # This is a wrong token!
558558 abort_with_message (403 , "Wrong token" )
559559 current_details = get_user_details (username )
560+ assert current_details is not None # for type checker
560561 # the email is stored in the JWT
561562 if claims ["email" ] != current_details .get ("email" ):
562563 # This is a wrong token!
563564 abort_with_message (403 , "Wrong token" )
564565 if current_details ["role" ] == ROLE_UNCONFIRMED :
565566 # otherwise it has been confirmed already
566567 modify_user (name = username , role = ROLE_DISABLED )
567- tree = get_tree_from_jwt ()
568+ # we cannot use get_tree_from_jwt here since the JWT does not
569+ # contain the tree ID
570+ tree = get_tree_id (user_id )
568571 is_multi = current_app .config ["TREE" ] == TREE_MULTI
569572 run_task (
570573 send_email_new_user ,
You can’t perform that action at this time.
0 commit comments