From d812a197d827d748a3768e1403586aab87e0fc00 Mon Sep 17 00:00:00 2001 From: William Moore Date: Fri, 23 Aug 2024 10:06:02 +0100 Subject: [PATCH] _marshal_images() handles missing archived flag --- omeroweb/webclient/tree.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/omeroweb/webclient/tree.py b/omeroweb/webclient/tree.py index 0faa9588ca..9ac72efb9b 100644 --- a/omeroweb/webclient/tree.py +++ b/omeroweb/webclient/tree.py @@ -531,7 +531,7 @@ def _marshal_image( """Given an Image row (list) marshals it into a dictionary. Order and type of columns in row is: * id (rlong) - * archived (boolean) + * archived (boolean) - optional. Defaults to False if only 5 in row * name (rstring) * details.owner.id (rlong) * details.permissions (dict) @@ -550,7 +550,11 @@ def _marshal_image( @param row_pixels The Image row pixels data to marshal @type row_pixels L{list} """ - image_id, archived, name, owner_id, permissions, fileset_id = row + if len(row) == 6: + image_id, archived, name, owner_id, permissions, fileset_id = row + else: + image_id, name, owner_id, permissions, fileset_id = row + archived = False image = dict() image["id"] = unwrap(image_id) image["archived"] = unwrap(archived) is True