Skip to content

Commit

Permalink
Fix code distribution query rounding (#91)
Browse files Browse the repository at this point in the history
* Fix code distribution query rounding for MSSQL compatibility

* Bump version number
  • Loading branch information
AndyRae authored Feb 18, 2025
1 parent 938fcd4 commit 13cdcd0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "hutch-bunny"
version = "1.0.0-alpha.4"
version = "1.0.0-alpha.5"
description = "A Cohort Discovery Task API worker"
license = { text = "MIT License" }
readme = "README.md"
Expand Down
4 changes: 2 additions & 2 deletions src/hutch_bunny/core/solvers/query_solvers.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def solve_query(self, results_modifier: list) -> Tuple[str, int]:
if rounding > 0:
stmnt = (
select(
func.count(table.person_id),
func.round((func.count() / rounding)) * rounding,
Concept.concept_id,
Concept.concept_name,
)
Expand All @@ -138,7 +138,7 @@ def solve_query(self, results_modifier: list) -> Tuple[str, int]:
else:
stmnt = (
select(
func.round((func.count() / rounding)) * rounding,
func.count(table.person_id),
Concept.concept_id,
Concept.concept_name,
)
Expand Down

0 comments on commit 13cdcd0

Please sign in to comment.