From def55e92215dba74e7c9532f8403efea8c34317e Mon Sep 17 00:00:00 2001 From: Egor fureunoir Gorbunov Date: Mon, 7 Jul 2025 19:43:06 +0300 Subject: [PATCH] Features: None; Fixes: 1) Change `UUID` to `String` for various GraphQL arguments; 2) Correct type annotation for `chosen_products` in `core/models.py`; Extra: None; --- core/graphene/mutations.py | 8 ++++---- core/models.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/core/graphene/mutations.py b/core/graphene/mutations.py index 72486f56..385dc4d0 100644 --- a/core/graphene/mutations.py +++ b/core/graphene/mutations.py @@ -175,13 +175,13 @@ class BuyOrder(BaseMutation): description = _("buy an order") class Arguments: - order_uuid = UUID(required=False) + order_uuid = String(required=False) order_hr_id = String(required=False) force_balance = Boolean(required=False) force_payment = Boolean(required=False) - promocode_uuid = UUID(required=False) - shipping_address = UUID(required=False) - billing_address = UUID(required=False) + promocode_uuid = String(required=False) + shipping_address = String(required=False) + billing_address = String(required=False) order = Field(OrderType, required=False) transaction = Field(TransactionType, required=False) diff --git a/core/models.py b/core/models.py index bfb2d6ce..b09b4eaf 100644 --- a/core/models.py +++ b/core/models.py @@ -1566,7 +1566,7 @@ class Order(ExportModelOperationsMixin("order"), NiceModel): # type: ignore [mi promocode_uuid: str | None = None, billing_address: str | None = None, shipping_address: str | None = None, - chosen_products: list = None, + chosen_products: list | None = None, ) -> Self | Transaction | None: order = self if chosen_products: