Skip to content

Commit

Permalink
Fix Telegram notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
pablosnt committed Dec 9, 2023
1 parent a0ce00f commit 755f2ba
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/backend/users/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,10 +256,9 @@ def update(self, instance: User, validated_data: Dict[str, Any]) -> User:
Returns:
User: Updated instance
"""
user = User.objects.update_password(instance, validated_data.get("password"))
if hasattr(user, "telegram_chat"):
Telegram().logout_after_password_change_message(user.telegram_chat)
return user
return User.objects.update_password(instance, validated_data.get("password"))


class ResetPasswordSerializer(PasswordSerializer, OTPSerializer):
Expand Down

0 comments on commit 755f2ba

Please sign in to comment.