Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't ignore params limit if offset is None #321

Merged
merged 2 commits into from Mar 17, 2022

Conversation

will-moore
Copy link
Member

Fixes #320

To test:

The params limit should not be ignored:

params = omero.sys.ParametersI()
params.theFilter = omero.sys.Filter()
params.theFilter.limit = wrap(1)
images = list(conn.getObjects("Image", params=params))
assert len(images) == 1

I'll add an integration test...

cc @erickmartins @joshmoore

@joshmoore
Copy link
Member

I don't assume anyone is depending on this behavior, so 👍 but in general, calling page(0, limit) would achieve the same, right?

@joshmoore
Copy link
Member

This looks good to me. 👍 There may be room for clarification in the doc string to specify what takes priority, etc. but that's not directly related to @erickmartins' issue.

@will-moore
Copy link
Member Author

On getObjects() and buildQuery() we have:

 :param params:      omero.sys.Parameters, can be used for pagination,
                            & filtering by owner. Takes precedence over opts.

@jburel
Copy link
Member

jburel commented Mar 17, 2022

Thanks
Suggesting to merge and tag 5.11.1

@jburel jburel merged commit 45c9942 into ome:master Mar 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: getObjects() params ignores limit if offset is None
3 participants