From bc6c5df109a35bf76be662a47d9c88a2a3b82351 Mon Sep 17 00:00:00 2001 From: Tom Christie Date: Mon, 13 Jan 2014 17:39:22 +0000 Subject: [PATCH] Minor tweaks --- rest_framework/serializers.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/rest_framework/serializers.py b/rest_framework/serializers.py index 0ea2cadbf..b4087e541 100644 --- a/rest_framework/serializers.py +++ b/rest_framework/serializers.py @@ -16,7 +16,6 @@ import datetime import inspect import types from decimal import Decimal -from django.core.exceptions import ImproperlyConfigured from django.core.paginator import Page from django.db import models from django.forms import widgets @@ -679,10 +678,7 @@ class ModelSerializer(Serializer): if model_field.rel: to_many = isinstance(model_field, models.fields.related.ManyToManyField) - try: - related_model = _resolve_model(model_field.rel.to) - except ValueError as error_message: - raise ImproperlyConfigured(error_message) + related_model = _resolve_model(model_field.rel.to) if to_many and not model_field.rel.through._meta.auto_created: has_through_model = True