diff --git a/omero_parade/table_filters/omero_filters.py b/omero_parade/table_filters/omero_filters.py index ec8cdb05..8df644f9 100644 --- a/omero_parade/table_filters/omero_filters.py +++ b/omero_parade/table_filters/omero_filters.py @@ -37,10 +37,11 @@ def get_script(request, script_name, conn): """Return a JS function to filter images by various params.""" project_id = request.GET.get('project') plate_id = request.GET.get('plate') + dataset_id = request.GET.get('dataset') - if project_id is None and plate_id is None: + if project_id is None and plate_id is None and dataset_id is None: return JsonResponse( - {'Error': 'Neither Project ID nor Plate ID specified'}) + {'Error': 'Neither Project, Dataset nor Plate ID specified'}) if script_name == "Table": table = None @@ -48,6 +49,9 @@ def get_script(request, script_name, conn): if project_id is not None: table = get_table(conn, 'Project', project_id) + if dataset_id is not None: + table = get_table(conn, 'Dataset', dataset_id) + if plate_id is not None: table = get_table(conn, 'Screen.plateLinks.child', plate_id) if table is None: