You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
JSONField was added just in Django 1.9[1] and in graphene code try import that as version 1.8.*
This could cause problem to convert_postgres_array_to_list, because if I'm using django 1.8 graphene_django will try import JSONField causing a ImportError and broke all the others imports.
A possible solution below:
try:
# Postgres fields are only available in Django 1.8+fromdjango.contrib.postgres.fieldsimportArrayField, HStoreField, RangeFieldexceptImportError:
ArrayField, HStoreField, RangeField= (MissingType, ) *3try:
# Postgres fields are only available in Django 1.9+fromdjango.contrib.postgres.fieldsimportJSONFieldexceptImportError:
JSONField=MissingType
Guys,
JSONField
was added just in Django 1.9[1] and in graphene code try import that as version 1.8.*This could cause problem to
convert_postgres_array_to_list
, because if I'm using django 1.8 graphene_django will try import JSONField causing a ImportError and broke all the others imports.A possible solution below:
[1] - https://docs.djangoproject.com/en/1.9/releases/1.9/
[2] - https://github.com/graphql-python/graphene-django/blob/master/graphene_django/compat.py#L23
The text was updated successfully, but these errors were encountered: