From 87bdf57a8ff6c0ef1433e6babb37a0b262a2856a Mon Sep 17 00:00:00 2001 From: Kelvin Muchiri Date: Wed, 12 Jul 2023 11:30:56 +0300 Subject: [PATCH] remove debugging logs --- onadata/apps/api/viewsets/user_profile_viewset.py | 3 --- onadata/libs/serializers/user_profile_serializer.py | 5 ----- 2 files changed, 8 deletions(-) diff --git a/onadata/apps/api/viewsets/user_profile_viewset.py b/onadata/apps/api/viewsets/user_profile_viewset.py index 549502e090..b41bbdadbe 100644 --- a/onadata/apps/api/viewsets/user_profile_viewset.py +++ b/onadata/apps/api/viewsets/user_profile_viewset.py @@ -5,7 +5,6 @@ import datetime import json -import logging from django.conf import settings from django.contrib.auth.password_validation import validate_password @@ -215,8 +214,6 @@ def get_serializer(self, *args, **kwargs): draft_request_data["invitation_id"] = invitation_id draft_request_data["invitation_token"] = invitation_token kwargs["data"] = draft_request_data - # TODO: for debugging purposes, should be removed before merging - logging.warning('Get serializer---------%s, %s', kwargs['data'].get('invitation_id'), kwargs['data'].get('invitation_token')) return super().get_serializer(*args, **kwargs) diff --git a/onadata/libs/serializers/user_profile_serializer.py b/onadata/libs/serializers/user_profile_serializer.py index 7e45bfc92e..28155954a7 100644 --- a/onadata/libs/serializers/user_profile_serializer.py +++ b/onadata/libs/serializers/user_profile_serializer.py @@ -17,7 +17,6 @@ from django.utils.translation import gettext as _ import six -import logging from django_digest.backend.db import update_partial_digests from registration.models import RegistrationProfile from rest_framework import serializers @@ -274,8 +273,6 @@ def update(self, instance, validated_data): ) def create(self, validated_data): """Creates a user registration profile and account.""" - # TODO: for debugging purposes, should be removed before merging - logging.warning('In create------------- %s %s', validated_data.get('invitation_id'), validated_data.get('invitation_token')) encoded_invitation_id = validated_data.pop("invitation_id", None) invitation_token = validated_data.pop("invitation_token", None) params = validated_data @@ -324,8 +321,6 @@ def create(self, validated_data): ) profile.save() invitation = None - # TODO: for debugging purposes, should be removed before merging - logging.warning('Invitation---------------------%s, %s', encoded_invitation_id, invitation_token) if encoded_invitation_id and invitation_token: invitation = ProjectInvitationEmail.check_invitation(