Skip to content

Commit 19e3edd

Browse files
authored
Allow passing of meta object in SerializerMutation options (#1028)
1 parent f5d94fd commit 19e3edd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

graphene_django/rest_framework/mutation.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ def __init_subclass_with_meta__(
6666
only_fields=(),
6767
exclude_fields=(),
6868
convert_choices_to_enum=True,
69+
_meta=None,
6970
**options
7071
):
7172

@@ -99,7 +100,8 @@ def __init_subclass_with_meta__(
99100
convert_choices_to_enum=convert_choices_to_enum,
100101
)
101102

102-
_meta = SerializerMutationOptions(cls)
103+
if not _meta:
104+
_meta = SerializerMutationOptions(cls)
103105
_meta.lookup_field = lookup_field
104106
_meta.model_operations = model_operations
105107
_meta.serializer_class = serializer_class

0 commit comments

Comments
 (0)