Skip to content

Commit

Permalink
Merge bf131b4 into 701d9bc
Browse files Browse the repository at this point in the history
  • Loading branch information
talavis committed Jun 26, 2019
2 parents 701d9bc + bf131b4 commit 10314be
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions backend/modules/browser/lookups.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,12 @@ def get_coverage_for_bases(dataset:str, chrom:str, start_pos:int, end_pos:int=No

if end_pos is None:
end_pos = start_pos
coverage = (db.Coverage.select()
.where((db.Coverage.pos >= start_pos) &
(db.Coverage.pos <= end_pos) &
(db.Coverage.chrom == chrom) &
(db.Coverage.dataset_version == dataset_version.id))
.dicts())
coverage = [row for row in (db.Coverage.select()
.where((db.Coverage.pos >= start_pos) &
(db.Coverage.pos <= end_pos) &
(db.Coverage.chrom == chrom) &
(db.Coverage.dataset_version == dataset_version.id))
.dicts())]
if not coverage:
raise error.NotFoundError('No coverage found for the region')
return coverage
Expand Down

0 comments on commit 10314be

Please sign in to comment.