submission api, briefcase api - api endpoints, closes #263

closes #263 
K
On Sep 19, 2014 4:15 PM, "ukanga" <notifications@github.com> wrote:

> In onadata/apps/api/viewsets/briefcase_api.py:
>
> > +        xform = get_object_or_404(queryset, id_string__iexact=formId)
> > +        self.check_object_permissions(self.request, xform)
> > +        instances = Instance.objects.filter(xform=xform).order_by('pk')
> > +        num_entries = self.request.GET.get('numEntries')
> > +        cursor = self.request.GET.get('cursor')
> > +
> > +        cursor = _parse_int(cursor)
> > +        if cursor:
> > +            instances = instances.filter(pk__gt=cursor)
> > +
> > +        num_entries = _parse_int(num_entries)
> > +        if num_entries:
> > +            instances = instances[:num_entries]
> > +
> > +        if instances.count():
> > +            last_instance = instances[instances.count() - 1]
>
> Its a queryset, throws
>
> AssertionError: Negative indexing is not supported
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/onaio/onadata/pull/563/files#r17806684>.
>