Skip to content

Commit 6710f11

Browse files
committed
omero.HdfStorage.update: add size check on data.rowNumbers
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.
1 parent 4fd72ef commit 6710f11

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/omero/hdfstorageV2.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -526,6 +526,7 @@ def append(self, cols):
526526
@modifies
527527
def update(self, stamp, data):
528528
self.__initcheck()
529+
self.__sizecheck([], data.rowNumbers)
529530
if data:
530531
for i, rn in enumerate(data.rowNumbers):
531532
for col in data.columns:

0 commit comments

Comments
 (0)