diff --git a/onadata/apps/api/urls.py b/onadata/apps/api/urls.py index d85aad518..4fd8676fb 100644 --- a/onadata/apps/api/urls.py +++ b/onadata/apps/api/urls.py @@ -39,7 +39,6 @@ def __init__(self, *args, **kwargs): # Dynamically generated routes. # Generated using @action or @link decorators on methods of the viewset - # FIXME find out with what value `detail` should be set self.lookups_routes.append(routers.Route( url=[ r'^{prefix}/{lookups}/{methodname}{trailing_slash}$', diff --git a/onadata/apps/main/views.py b/onadata/apps/main/views.py index c81e3b111..6466493e4 100644 --- a/onadata/apps/main/views.py +++ b/onadata/apps/main/views.py @@ -63,8 +63,7 @@ def profile(request, username): "/%s" % request.user.username) url = request_url.replace('http://', 'https://') xforms = XForm.objects.filter(user=content_user)\ - .select_related('user')\ - .prefetch_related('instances') + .select_related('user', 'instances') user_xforms = xforms # forms shared with user diff --git a/onadata/libs/serializers/note_serializer.py b/onadata/libs/serializers/note_serializer.py index 69b85abac..b18a7d0fe 100644 --- a/onadata/libs/serializers/note_serializer.py +++ b/onadata/libs/serializers/note_serializer.py @@ -8,8 +8,6 @@ class NoteSerializer(serializers.ModelSerializer): - # ToDo Verify why calling this here? - serializers.ModelSerializer() instance = serializers.PrimaryKeyRelatedField(queryset=Instance.objects.all()) class Meta: