Skip to content

Commit

Permalink
omero.HdfStorage.update: add size check on data.rowNumbers
Browse files Browse the repository at this point in the history
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([], data.rowNumbers)
which should raise an ApiUsageException with an appropriate error
message in that scenario.
  • Loading branch information
sbesson committed Sep 25, 2024
1 parent 4fd72ef commit 6710f11
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/omero/hdfstorageV2.py
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,7 @@ def append(self, cols):
@modifies
def update(self, stamp, data):
self.__initcheck()
self.__sizecheck([], data.rowNumbers)
if data:
for i, rn in enumerate(data.rowNumbers):
for col in data.columns:
Expand Down

0 comments on commit 6710f11

Please sign in to comment.