Skip to content

Commit 9c8826f

Browse files
authored
FieldDoesNotExist import bug fix (#114)
1 parent 9dfc270 commit 9c8826f

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

drf_writable_nested/mixins.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33

44
from django.contrib.contenttypes.fields import GenericRelation
55
from django.contrib.contenttypes.models import ContentType
6-
from django.db.models import ProtectedError, FieldDoesNotExist
6+
from django.core.exceptions import FieldDoesNotExist
7+
from django.db.models import ProtectedError
78
from django.db.models.fields.related import ForeignObjectRel
89
from django.utils.translation import gettext_lazy as _
910
from rest_framework import serializers

tox.ini

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@ DJANGO_SETTINGS_MODULE = tests.settings
66
envlist =
77
py{35,36,37,38}-dj{22}-drf{38,39,310,311}
88
py{36,37,38}-dj{30}-drf{310,311}
9+
py{36,37,38}-dj{31}-drf{311}
910
skip_missing_interpreters = true
1011

1112
[travis:env]
1213
DJANGO =
1314
2.2: dj22
1415
3.0: dj30
16+
3.1: dj31
1517

1618
[testenv]
1719
commands = ./py.test --cov drf_writable_nested
@@ -21,6 +23,7 @@ setenv =
2123
deps =
2224
dj22: Django>=2.2,<2.3
2325
dj30: Django>=3.0,<3.1
26+
dj31: Django>=3.1,<3.2
2427
drf38: djangorestframework>=3.8.0,<3.9
2528
drf39: djangorestframework>=3.9.0,<3.10
2629
drf310: djangorestframework>=3.10.0,<3.11

0 commit comments

Comments
 (0)