Skip to content

Commit

Permalink
Filter for specific form being requested
Browse files Browse the repository at this point in the history
  • Loading branch information
moshthepitt committed Jan 31, 2018
1 parent eb6b3a8 commit c0952dc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion onadata/libs/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c0952dc

Please sign in to comment.