diff --git a/apps/herd/exception.py b/apps/herd/exception.py index 3d12130..d4b6664 100644 --- a/apps/herd/exception.py +++ b/apps/herd/exception.py @@ -9,7 +9,7 @@ class UniqueRancherApiException(APIException): class DuplicateRancherException(APIException): status_code = status.HTTP_403_FORBIDDEN - default_detail = "دامدار با این شماره تماس از قبل در سیستم وجود دارد" # noqa + default_detail = "اطلاعات دامدار استعلام شده دارای مشکل میباشد با پشتیبانی تماس بگیرید" # noqa class HerdCapacityException(APIException): diff --git a/apps/herd/pos/api/v1/api.py b/apps/herd/pos/api/v1/api.py index 03e0366..3653bb4 100644 --- a/apps/herd/pos/api/v1/api.py +++ b/apps/herd/pos/api/v1/api.py @@ -7,7 +7,6 @@ from rest_framework.permissions import AllowAny from rest_framework.response import Response from apps.core.mixins.search_mixin import DynamicSearchMixin -from apps.herd.exception import DuplicateRancherException from apps.herd.models import Herd, Rancher from apps.herd.pos.api.v1.serializers import HerdSerializer, RancherSerializer from apps.livestock.web.api.v1.serializers import LiveStockSerializer @@ -141,8 +140,8 @@ class RancherViewSet(viewsets.ModelViewSet, DynamicSearchMixin): rancher = self.queryset.filter(national_code=request.data['national_code']) - if len(rancher) > 1: - raise DuplicateRancherException() + # if len(rancher) > 1: + # raise DuplicateRancherException() if rancher.exists(): serializer = self.serializer_class(rancher.first())