mirror of
https://github.com/graphql-python/graphene.git
synced 2025-02-02 12:44:15 +03:00
Fixed IntegerField forcing in GlobalIDFormField. Fixed #259
This commit is contained in:
parent
05d71aac75
commit
a8feba6ab4
|
@ -1,7 +1,7 @@
|
|||
import binascii
|
||||
|
||||
from django.core.exceptions import ValidationError
|
||||
from django.forms import CharField, Field, IntegerField, MultipleChoiceField
|
||||
from django.forms import CharField, Field, MultipleChoiceField
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from graphql_relay import from_global_id
|
||||
|
@ -22,7 +22,7 @@ class GlobalIDFormField(Field):
|
|||
raise ValidationError(self.error_messages['invalid'])
|
||||
|
||||
try:
|
||||
IntegerField().clean(_id)
|
||||
CharField().clean(_id)
|
||||
CharField().clean(_type)
|
||||
except ValidationError:
|
||||
raise ValidationError(self.error_messages['invalid'])
|
||||
|
|
Loading…
Reference in New Issue
Block a user