Allow passing of meta object in SerializerMutation options (#1028)

This commit is contained in:
Josh Warwick 2020-08-26 16:03:08 +01:00 committed by GitHub
parent f5d94fda1f
commit 19e3eddddb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -66,6 +66,7 @@ class SerializerMutation(ClientIDMutation):
only_fields=(), only_fields=(),
exclude_fields=(), exclude_fields=(),
convert_choices_to_enum=True, convert_choices_to_enum=True,
_meta=None,
**options **options
): ):
@ -99,7 +100,8 @@ class SerializerMutation(ClientIDMutation):
convert_choices_to_enum=convert_choices_to_enum, convert_choices_to_enum=convert_choices_to_enum,
) )
_meta = SerializerMutationOptions(cls) if not _meta:
_meta = SerializerMutationOptions(cls)
_meta.lookup_field = lookup_field _meta.lookup_field = lookup_field
_meta.model_operations = model_operations _meta.model_operations = model_operations
_meta.serializer_class = serializer_class _meta.serializer_class = serializer_class