diff --git a/app/__pycache__/excel_processing.cpython-39.pyc b/app/__pycache__/excel_processing.cpython-39.pyc index bda6062..9df0dac 100644 Binary files a/app/__pycache__/excel_processing.cpython-39.pyc and b/app/__pycache__/excel_processing.cpython-39.pyc differ diff --git a/app/__pycache__/helper.cpython-39.pyc b/app/__pycache__/helper.cpython-39.pyc index 3bc7b67..b7cc30a 100644 Binary files a/app/__pycache__/helper.cpython-39.pyc and b/app/__pycache__/helper.cpython-39.pyc differ diff --git a/app/__pycache__/helper_excel.cpython-39.pyc b/app/__pycache__/helper_excel.cpython-39.pyc index 7b69508..ec44869 100644 Binary files a/app/__pycache__/helper_excel.cpython-39.pyc and b/app/__pycache__/helper_excel.cpython-39.pyc differ diff --git a/app/__pycache__/views.cpython-39.pyc b/app/__pycache__/views.cpython-39.pyc index 2896566..5ea4d88 100644 Binary files a/app/__pycache__/views.cpython-39.pyc and b/app/__pycache__/views.cpython-39.pyc differ diff --git a/app/excel_processing.py b/app/excel_processing.py index 612ed1b..ba32b36 100644 --- a/app/excel_processing.py +++ b/app/excel_processing.py @@ -2590,7 +2590,10 @@ def all_products_transport_excel(request): filters['product'] = product_type if destination_province and destination_province != 'undefined': - filters['destination_province'] = normalize_persian_arabic_text(destination_province) + if destination_province == 'مرکزی': + filters['destination_province'] = 'مركزي' + else: + filters['destination_province'] = destination_province if date1 and date2 and date1 != 'undefined' and date2 != 'undefined': try: diff --git a/app/helper.py b/app/helper.py index 2e65b65..fd76876 100644 --- a/app/helper.py +++ b/app/helper.py @@ -160,7 +160,7 @@ def normalize_persian_arabic_text(text): # 'ک' (U+06A9 - Persian Kaf) -> 'ك' (U+0643 - Arabic Kaf) # 'ی' (U+06CC - Persian Yeh) -> 'ي' (U+064A - Arabic Yeh) text = str(text) - text = text.replace('ک', 'ك') # Persian Kaf to Arabic Kaf + # text = text.replace('ک', 'ك') # Persian Kaf to Arabic Kaf text = text.replace('ی', 'ي') # Persian Yeh to Arabic Yeh return text diff --git a/app/views.py b/app/views.py index a71e302..a1797e9 100644 --- a/app/views.py +++ b/app/views.py @@ -4522,7 +4522,10 @@ class AllProductsTransportViewSet(viewsets.ModelViewSet): filters['product'] = product_type if destination_province and destination_province != 'undefined': - filters['destination_province'] = normalize_persian_arabic_text(destination_province) + if destination_province == 'مرکزی': + filters['destination_province'] = 'مرکزي' + else: + filters['destination_province'] = destination_province if date1 and date2 and date1 != 'undefined' and date2 != 'undefined': try: @@ -4762,7 +4765,10 @@ class AllProductsTransportDashboardView(APIView): destination_province = request.GET.get('destination_province') kill_house_filterset_class = AllProductsTransportFilterSet if destination_province and destination_province != 'undefined': - filters['destination_province'] = normalize_persian_arabic_text(destination_province) + if destination_province == 'مرکزی': + filters['destination_province'] = 'مركزي' + else: + filters['destination_province'] = destination_province queryset = AllProductsTransport.objects.filter(**filters) if search and search != 'undefined' and search.strip():