Skip to content

Commit 6d7a0d0

Browse files
author
Grant McConnaughey
committed
Make id field an ID type
1 parent 748dc4c commit 6d7a0d0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

graphene_django/forms/mutation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ def __init_subclass_with_meta__(cls, form_class=None, model=None, return_field_n
128128

129129
form = form_class()
130130
input_fields = fields_for_form(form, only_fields, exclude_fields)
131-
input_fields['id'] = convert_form_field(model._meta.pk)
131+
input_fields['id'] = graphene.ID()
132132

133133
registry = get_global_registry()
134134
model_type = registry.get_type_for_model(model)

graphene_django/forms/tests/test_mutation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def test_needs_form_class():
2222
class MyMutation(DjangoFormMutation):
2323
pass
2424

25-
assert exc.value.args[0] == 'form_class is required for FormMutation'
25+
assert exc.value.args[0] == 'form_class is required for DjangoFormMutation'
2626

2727

2828
def test_has_output_fields():

0 commit comments

Comments
 (0)