From f03849d15cb76a5bd2e4b856c0afa04d332fb2a7 Mon Sep 17 00:00:00 2001 From: William Moore Date: Tue, 12 Dec 2023 12:27:17 +0000 Subject: [PATCH] sort by ID to pick the first image from fileset --- omeroweb/webclient/show.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/omeroweb/webclient/show.py b/omeroweb/webclient/show.py index 601bcab245..2929f1d703 100644 --- a/omeroweb/webclient/show.py +++ b/omeroweb/webclient/show.py @@ -276,7 +276,7 @@ def _load_first_selected(self, first_obj, attributes): params = omero.sys.ParametersI() params.addId(attributes["id"]) params.page(0, 1) - query = "select img from Image img where img.fileset.id=:id" + query = "select img from Image img where img.fileset.id=:id order by img.id" first_image = self.conn.getQueryService().findAllByQuery( query, params, self.conn.SERVICE_OPTS )[0]