Skip to content

Commit

Permalink
Merge pull request #271 from will-moore/well_images_non_default_group
Browse files Browse the repository at this point in the history
Use conn.SERVICE_OPTS in well_images()
  • Loading branch information
jburel authored Aug 8, 2019
2 parents c1d5462 + 3c93a4e commit 5bc0c3f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions plugin/omero_iviewer/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,8 @@ def well_images(request, conn=None, **kwargs):
# get total count first
count = query_service.projection(
"select count(distinct ws.id) from WellSample ws " +
"where ws.well.id = :well_id", params, )
"where ws.well.id = :well_id", params,
conn.SERVICE_OPTS)
results = {"data": [], "meta": {"totalCount": count[0][0].val}}

# set offset and limit
Expand All @@ -494,7 +495,8 @@ def well_images(request, conn=None, **kwargs):
# fire off query
images = query_service.findAllByQuery(
"select ws.image from WellSample ws " +
"where ws.well.id = :well_id order by well_index", params)
"where ws.well.id = :well_id order by well_index", params,
conn.SERVICE_OPTS)

# we need only image id and name for our purposes
for img in images:
Expand Down

0 comments on commit 5bc0c3f

Please sign in to comment.