From 86f7f7a51b7e57919c9e5907ade48cc05159fcef Mon Sep 17 00:00:00 2001 From: no-dap Date: Sun, 13 Oct 2019 07:09:11 +0900 Subject: [PATCH] add raise exception on serializer validation --- graphene_django/rest_framework/mutation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/graphene_django/rest_framework/mutation.py b/graphene_django/rest_framework/mutation.py index d9c695e..fdd6c10 100644 --- a/graphene_django/rest_framework/mutation.py +++ b/graphene_django/rest_framework/mutation.py @@ -124,7 +124,7 @@ class SerializerMutation(ClientIDMutation): kwargs = cls.get_serializer_kwargs(root, info, **input) serializer = cls._meta.serializer_class(**kwargs) - if serializer.is_valid(): + if serializer.is_valid(raise_exception=True): return cls.perform_mutate(serializer, info) else: errors = ErrorType.from_errors(serializer.errors)