Skip to content

Commit

Permalink
_marshal_images() handles missing archived flag
Browse files Browse the repository at this point in the history
  • Loading branch information
will-moore committed Aug 23, 2024
1 parent 7cd445c commit d812a19
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions omeroweb/webclient/tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down

0 comments on commit d812a19

Please sign in to comment.