harvest-dev team mailing list archive
-
harvest-dev team
-
Mailing list archive
-
Message #00700
[Bug 974431] Re: /services/ API does offset/length calculation wrong
Won't get around to this until next week. If anyone wants to work on
this, please go ahead.
It will be good to fix this, so we can have interesting clients talking
to Harvest, ie. a dev opportunities lens for Unity. ;-)
** Changed in: harvest
Assignee: Daniel Holbach (dholbach) => (unassigned)
--
You received this bug notification because you are a member of harvest-
dev, which is the registrant for harvest.
https://bugs.launchpad.net/bugs/974431
Title:
/services/ API does offset/length calculation wrong
Status in Harvest Service:
Triaged
Bug description:
The code is currently written like this:
offset = parse_number_argument(extra_arguments, '_offset')
length = parse_number_argument(extra_arguments, '_length')
if not length or length > CHUNK_SIZE:
length = CHUNK_SIZE
results = model.objects.filter(**search_values)[offset:length]
This means that we will never be able to get more objects with an id> CHUNK_SIZE.
To manage notifications about this bug go to:
https://bugs.launchpad.net/harvest/+bug/974431/+subscriptions
References