diff --git a/django_comments_xtd/api/serializers.py b/django_comments_xtd/api/serializers.py index 577217f2..71d004f2 100644 --- a/django_comments_xtd/api/serializers.py +++ b/django_comments_xtd/api/serializers.py @@ -94,7 +94,7 @@ def validate(self, data): except (AttributeError, TypeError, LookupError): raise serializers.ValidationError("Invalid content_type value: %r" % escape(ctype)) - except model.ObjectDoesNotExist: + except model.DoesNotExist: raise serializers.ValidationError( "No object matching content-type %r and object PK %r exists." % (escape(ctype), escape(object_pk)))