Skip to content

Commit

Permalink
Bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
AyaanKakkar committed Sep 23, 2024
1 parent 836fad2 commit 5d1bf11
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/graphql/models/annotation_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class DocCount:

@strawberry.input
class Histogram:
interval: Optional[int] = 4893.27
interval: Optional[float] = 4893.27
min: Optional[int] = 10636
max: Optional[int] = 499963

Expand Down
3 changes: 2 additions & 1 deletion src/graphql/resolvers/helper_resolver.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import inspect
import json
import typing
from typing import Dict
from src.graphql.gene_pos import get_pos_from_gene_id, map_gene, chromosomal_location_dic
from src.graphql.models.snp_model import ScrollSnp, Snp, SnpAggs
Expand Down Expand Up @@ -263,7 +264,7 @@ async def get_aggregation_query(aggregation_fields: list[tuple[str, list[str]]],

# Check the type of the field. If it is a string, then we have to add .keyword to the field name while querying missing and frequency
# Using the pydantic model Snp, we can check the type of the field
is_text_field = inspect.get_annotations(Snp)[field] == str
is_text_field = typing.get_args(inspect.get_annotations(Snp)[field])[0] == str
textual_suffix = '.keyword' if is_text_field else ''

for subfield in subfields:
Expand Down

0 comments on commit 5d1bf11

Please sign in to comment.