Reformatted files

This commit is contained in:
ITQ
2024-03-03 18:15:03 +03:00
parent 20e6e512d2
commit 12bda5d3da
3 changed files with 8 additions and 3 deletions
+4 -1
View File
@@ -210,7 +210,10 @@ class PasswordChangeApiView(APIView):
old_password = serializer.validated_data.get("oldPassword")
new_password = serializer.validated_data.get("newPassword")
if bcrypt.checkpw(old_password.encode("utf-8"), request.user.password.encode("utf-8")):
if bcrypt.checkpw(
old_password.encode("utf-8"),
request.user.password.encode("utf-8"),
):
password_hash = bcrypt.hashpw(
new_password.encode("utf-8"), bcrypt.gensalt()
).decode("utf-8")