Skip to content

Commit

Permalink
Merge pull request ome#321 from will-moore/getObjects_params_limit_fix
Browse files Browse the repository at this point in the history
Don't ignore params limit if offset is None
  • Loading branch information
jburel authored Mar 17, 2022
2 parents bf230dd + f9f15de commit 45c9942
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/omero/gateway/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3381,12 +3381,14 @@ def buildQuery(self, obj_type, ids=None, params=None, attributes=None,
# pagination
ofs = params.theFilter.offset
lmt = params.theFilter.limit
if ofs is not None and lmt is not None:
if ofs is not None:
offset = ofs.val
if lmt is not None:
limit = lmt.val
# Other params args will be ignored unless we handle here

if limit is not None and offset is not None:
if limit is not None:
if offset is None:
offset = 0
baseParams.page(offset, limit)

# getting object by ids
Expand Down

0 comments on commit 45c9942

Please sign in to comment.