diff --git a/onadata/libs/filters.py b/onadata/libs/filters.py index 8b351e898a..6d8aa90ce7 100644 --- a/onadata/libs/filters.py +++ b/onadata/libs/filters.py @@ -213,7 +213,8 @@ def _xform_filter(self, request, view, keyword): int_or_parse_error(xform, u"Invalid value for formid %s.") self.xform = get_object_or_404(XForm, pk=xform) xform_qs = XForm.objects.filter(pk=self.xform.pk) - public_forms = XForm.objects.filter(shared_data=True) + public_forms = XForm.objects.filter(pk=self.xform.pk, + shared_data=True) else: xform_qs = XForm.objects.all() xform_qs = xform_qs.filter(deleted_at=None)