Because it’s a HyperlinkedModelSerializer
your serializer is trying to resolve the URL for the related User
on your Bottle
.
As you don’t have the user detail view it can’t do this. Hence the exception.
- Would not just registering the
UserViewSet
with the router solve your issue? - You could define the user field on your
BottleSerializer
to explicitly use theUserSerializer
rather than trying to resolve the URL. See the serializer docs on dealing with nested objects for that.