Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @classmethod
- def mutate_and_get_payload(cls, input, context, info):
- user = context.user
- old_password = input.get('old_password')
- new_password = input.get('new_password')
- if user.has_usable_password():
- if not user.check_password(old_password):
- raise ResponseError(
- "Invalid Password",
- code='invalid_old_password')
- # ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement