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

omero.HdfStorage.update: add size check on data.rowNumbers #431

Merged
merged 1 commit into from
Dec 4, 2024

Conversation

sbesson
Copy link
Member

@sbesson sbesson commented Sep 26, 2024

Currently if the omero.grid.Data passed to table.update() has rowNumbers values outside the range of rows, the implementation will raise an IndexError which will be returned as an InternalException to the client.
This commit adds an initial call to self.__sizecheck(None, data.rowNumbers) which should raise an ApiUsageException with an appropriate error message in that scenario.

This scenario should be covered by the last tests introduced in ome/openmicroscopy#6412

Currently if the omero.grid.Data passed to table.update() has
rowNumbers values outside the range of rows, the implementation will
raise an IndexError which will be returned as an InternalException
to the client.
This commit adds an initial call to self.__sizecheck(None, data.rowNumbers)
which should raise an ApiUsageException with an appropriate error
message in that scenario.
@sbesson sbesson force-pushed the table_update_outofrange branch from 6710f11 to 0e500ec Compare September 26, 2024 10:34
@sbesson sbesson requested a review from jburel November 19, 2024 08:58
@jburel jburel merged commit 7e296f2 into ome:master Dec 4, 2024
13 checks passed
@sbesson sbesson deleted the table_update_outofrange branch December 4, 2024 16:12
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.

2 participants