From 8e51a9781d4ffdc56d6108c77b969b1f9aebf7b0 Mon Sep 17 00:00:00 2001 From: Guillaume Andreu Sabater Date: Tue, 3 Dec 2024 09:42:37 +0100 Subject: [PATCH] allow FullCleanOptions in full_clean arg annotation --- 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,