From 1dd34ad95d20cb1fc4bcec63fb006df602be4f37 Mon Sep 17 00:00:00 2001 From: Guillaume Andreu Sabater Date: Sun, 8 Dec 2024 18:21:40 +0100 Subject: [PATCH] allow FullCleanOptions in full_clean arg annotation (#667) --- strawberry_django/mutations/fields.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/strawberry_django/mutations/fields.py b/strawberry_django/mutations/fields.py index 5296cd37..5d7f5929 100644 --- a/strawberry_django/mutations/fields.py +++ b/strawberry_django/mutations/fields.py @@ -43,6 +43,8 @@ ) from typing_extensions import Literal, Self + from .types import FullCleanOptions + def _get_validation_errors(error: Exception): if isinstance(error, PermissionDenied): @@ -177,7 +179,7 @@ class DjangoMutationCUD(DjangoMutationBase): def __init__( self, input_type: type | None = None, - full_clean: bool = True, + full_clean: bool | FullCleanOptions = True, argument_name: str | None = None, key_attr: str | None = None, **kwargs,