Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support filtering by OMERO.tables on Dataset #86

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions omero_parade/table_filters/omero_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,21 @@ 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

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:
Expand Down