def perform_update(self, serializer):
    validated_by_manager_old = serializer.instance.validated_by_manager
    super().perform_update(serializer)
    validated_by_manager_new = serializer.instance.validated_by_manager
    if ((not validated_by_manager_old) and validated_by_manager_new):
        emails.send_notification_to_user_validated(serializer.instance)
def perform_update(self, serializer):
    validated_by_manager_old = serializer.instance.validated_by_manager
    super().perform_update(serializer)
    validated_by_manager_new = serializer.instance.validated_by_manager
    if ((not validated_by_manager_old) and validated_by_manager_new):
        emails.send_notification_to_user_validated(serializer.instance)