mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-04-26 03:53:46 +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)
|
choices = getattr(field, 'choices', None)
|
||||||
|
|
||||||
# If is a choice field, but not depends on models
|
# 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:
|
if form:
|
||||||
name = to_camel_case("{}_{}".format(get_form_name(form), field.label or name))
|
name = to_camel_case("{}_{}".format(get_form_name(form), field.label or name))
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user