From 8dc65943341aca8177839e56cb6f3faba1f29c46 Mon Sep 17 00:00:00 2001 From: Andrey Smakotin Date: Thu, 11 Dec 2025 22:21:11 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=BE=20=D0=BF=D0=BE=D0=B4=D1=80=D0=BE=D0=B1=D0=BD=D0=BE?= =?UTF-8?q?=D0=B5=20=D0=BB=D0=BE=D0=B3=D0=B8=D1=80=D0=BE=D0=B2=D0=B0=D0=BD?= =?UTF-8?q?=D0=B8=D0=B5=20=D0=BE=D1=88=D0=B8=D0=B1=D0=BE=D0=BA=20=D0=B2?= =?UTF-8?q?=D0=B0=D0=BB=D0=B8=D0=B4=D0=B0=D1=86=D0=B8=D0=B8=20=D0=B2=20POS?= =?UTF-8?q?=20checkout?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Для диагностики проблемы с продажей витринных комплектов добавлено логирование ValidationError с полным traceback. Это поможет определить в какой именно момент и почему происходит ошибка валидации. --- myproject/pos/views.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/myproject/pos/views.py b/myproject/pos/views.py index 4f4d254..0450634 100644 --- a/myproject/pos/views.py +++ b/myproject/pos/views.py @@ -1532,8 +1532,10 @@ def pos_checkout(request): }) except (Customer.DoesNotExist, Warehouse.DoesNotExist, Product.DoesNotExist, ProductKit.DoesNotExist) as e: + logger.error(f'POS Checkout: объект не найден: {str(e)}') return JsonResponse({'success': False, 'error': 'Объект не найден'}, status=404) except ValidationError as e: + logger.error(f'POS Checkout: ошибка валидации: {str(e)}', exc_info=True) return JsonResponse({'success': False, 'error': str(e)}, status=400) except json.JSONDecodeError: return JsonResponse({'success': False, 'error': 'Неверный формат JSON'}, status=400)