Skip to content

Commit f8dff38

Browse files
author
Jay Hale
committed
Remove unnecessary compat utility for Django < 1.11
1 parent d8bdda9 commit f8dff38

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

graphene_django/compat.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,7 @@ class MissingType(object):
55
try:
66
# Postgres fields are only available in Django with psycopg2 installed
77
# and we cannot have psycopg2 on PyPy
8-
from django.contrib.postgres.fields import ArrayField, HStoreField, RangeField
8+
from django.contrib.postgres.fields import (ArrayField, HStoreField,
9+
JSONField, RangeField)
910
except ImportError:
1011
ArrayField, HStoreField, JSONField, RangeField = (MissingType,) * 4
11-
12-
13-
try:
14-
# Postgres fields are only available in Django 1.9+
15-
from django.contrib.postgres.fields import JSONField
16-
except ImportError:
17-
JSONField = MissingType

0 commit comments

Comments
 (0)