Skip to content

Commit bd3afe1

Browse files
authored
Merge pull request #236 from cuappdev/tran/quick-fix
fix bug
2 parents 899a29d + a71a3d6 commit bd3afe1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/schema.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -896,7 +896,7 @@ def mutate(self, info, user_id, name=None, email=None, encoded_image=None):
896896

897897
if not existing_user:
898898
raise GraphQLError("User with given id does not exist.")
899-
if get_jwt_identity() != user_id:
899+
if int(get_jwt_identity()) != user_id:
900900
raise GraphQLError("Unauthorized operation")
901901
if name is not None:
902902
existing_user.name = name
@@ -1192,7 +1192,7 @@ def mutate(self, info, user_id):
11921192
if not user:
11931193
raise GraphQLError("User with given ID does not exist.")
11941194

1195-
if get_jwt_identity() != user_id:
1195+
if int(get_jwt_identity()) != user_id:
11961196
raise GraphQLError("Unauthorized operation")
11971197

11981198
s3 = boto3.client(

0 commit comments

Comments
 (0)