mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-04-25 19:43:51 +03:00
Merge pull request #14 from revolico/order-choices-verification#13
Change verification order
This commit is contained in:
commit
65c40f643d
|
@ -103,7 +103,7 @@ def convert_form_field_with_choices(field, name=None, form=None):
|
|||
choices = getattr(field, 'choices', None)
|
||||
|
||||
# If is a choice field, but not depends on models
|
||||
if choices and not isinstance(field, (forms.ModelMultipleChoiceField, forms.ModelChoiceField)):
|
||||
if not isinstance(field, (forms.ModelMultipleChoiceField, forms.ModelChoiceField)) and choices:
|
||||
if form:
|
||||
name = to_camel_case("{}_{}".format(get_form_name(form), field.label or name))
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue
Block a user