From 2b1cdb28ea1457a9240d97bab78d11cdde94d0d2 Mon Sep 17 00:00:00 2001 From: Nikolai R Kristiansen Date: Fri, 30 May 2025 16:17:45 +0200 Subject: [PATCH] fix: Fix union syntax --- bbs/api/mutations/shop.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bbs/api/mutations/shop.py b/bbs/api/mutations/shop.py index 1bebcff..f1147ea 100644 --- a/bbs/api/mutations/shop.py +++ b/bbs/api/mutations/shop.py @@ -1,4 +1,4 @@ -from typing import Annotated +from typing import Annotated, Union import strawberry from django.conf import settings @@ -32,7 +32,7 @@ class InsufficientFunds(Error): # noqa: N818 CreateOrderResponse = Annotated[ - CreateOrderSuccess | InsufficientFunds | FormErrors, strawberry.union("CreateOrderResponse") + Union[CreateOrderSuccess, InsufficientFunds, FormErrors], strawberry.union("CreateOrderResponse") # noqa: UP007 ] @@ -100,7 +100,7 @@ class AboveMaxSaldo(Error): # noqa: N818 CreateDepositResponse = Annotated[ - CreateDepositSuccess | AboveMaxSaldo | FormErrors, strawberry.union("CreateDepositResponse") + Union[CreateDepositSuccess, AboveMaxSaldo, FormErrors], strawberry.union("CreateDepositResponse") # noqa: UP007 ]