ome / omero-parade

OMERO.web plugin for displaying Dataset thumbnails or Plates in webclient center panel
GNU Affero General Public License v3.0
1 stars 12 forks source link

Multiple OMERO.tables picked randomly #106

Open will-moore opened 1 year ago

will-moore commented 1 year ago

See https://forum.image.sc/t/multiple-omero-tables-crash-omero-parade/72477

Currently we do this in table_filters/data_providers.py, which picks a "random" table since _bulk_file_annotations() returns unsorted results from HQL query:

def get_table(conn, objtype, objid):
    data = _bulk_file_annotations(None, objtype, objid, conn=conn).get(
        'data', [])
    if len(data) < 1:
        return None
    # Just use the first Table we find
    # TODO: handle multiple tables!?
    data = data[0]

Simply need to sort by ID, then pick the highest ID (most recent).

NB: Supporting multiple OMERO.tables (as we do for csv) is a much bigger task

imagesc-bot commented 1 year ago

This issue has been mentioned on Image.sc Forum. There might be relevant details there:

https://forum.image.sc/t/multiple-omero-tables-crash-omero-parade/72477/2

Rdornier commented 1 year ago

NB: Supporting multiple OMERO.tables (as we do for csv) is a much bigger task

Sure, but it could very useful since OMERO.web now supportes multiple OMERO.tables at the dataset level, all being read in the "Table" tab of each image, that wasn't the case before.