We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9a94226 commit cc0b0eeCopy full SHA for cc0b0ee
data_wizard/idmap.py
@@ -1,11 +1,10 @@
1
-from rest_framework.serializers import ValidationError
2
-
3
4
def never(value, field):
5
return None
6
7
8
def existing(value, field):
+ # FIXME: Move import to top when dropping Django 1.11
+ from rest_framework.serializers import ValidationError
9
try:
10
field.to_internal_value(value)
11
except ValidationError:
tests/data_app/wizard.py
@@ -48,6 +48,7 @@ class Meta:
48
model = FKModel
49
fields = "__all__"
50
51
+
52
class SlugMapExistingSerializer(SlugSerializer):
53
class Meta(SlugSerializer.Meta):
54
data_wizard = {
0 commit comments