Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Try fixing the test failures
  • Loading branch information
matthiask committed Aug 22, 2020
commit 1a70504be4e1eb278439ebda1da7e7047281c4fa
10 changes: 7 additions & 3 deletions tests/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,12 @@ class Binary(models.Model):
try:
from django.db.models import JSONField
except ImportError: # Django<3.1
from django.contrib.postgres.fields import JSONField
try:
from django.contrib.postgres.fields import JSONField
except ImportError: # psycopg2 not installed
JSONField = None


class PostgresJSON(models.Model):
field = JSONField()
if JSONField:
class PostgresJSON(models.Model):
field = JSONField()