From 74efac8712e61af68d76ce03e301f9446e828e8b Mon Sep 17 00:00:00 2001 From: William Moore Date: Fri, 23 Aug 2024 10:33:28 +0100 Subject: [PATCH] Add warning to _marshal_image when archived is missing --- omeroweb/webclient/tree.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/omeroweb/webclient/tree.py b/omeroweb/webclient/tree.py index 9ac72efb9b..87c67f565b 100644 --- a/omeroweb/webclient/tree.py +++ b/omeroweb/webclient/tree.py @@ -23,6 +23,7 @@ import time import pytz import omero +import warnings from collections import defaultdict from omero.rtypes import rlong, unwrap, wrap @@ -553,6 +554,9 @@ def _marshal_image( if len(row) == 6: image_id, archived, name, owner_id, permissions, fileset_id = row else: + # Likely this is being called by external code + warnings.warn("_marshal_image() is a 'private' function; " + "row should have 6 elements", DeprecationWarning), image_id, name, owner_id, permissions, fileset_id = row archived = False image = dict()