Skip to content

Commit

Permalink
fix param
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrOertlin committed Apr 8, 2024
1 parent 6b20c7b commit 72e45f9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions genotype_api/database/filters/genotype_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
from genotype_api.database.models import Genotype


def filter_genotypes_by_id(genotype_id: int, genotypes: Query, **kwargs) -> Query:
def filter_genotypes_by_id(entry_id: int, genotypes: Query, **kwargs) -> Query:
"""Return genotype by id."""
return genotypes.filter(Genotype.id == genotype_id)
return genotypes.filter(Genotype.id == entry_id)


def apply_genotype_filter(
Expand All @@ -18,7 +18,7 @@ def apply_genotype_filter(
genotypes: Query,
) -> Query:
for filter_function in filter_functions:
genotypes: Query = filter_function(genotypes=genotypes, id=id)
genotypes: Query = filter_function(genotypes=genotypes, entry_id=entry_id)
return genotypes


Expand Down
2 changes: 1 addition & 1 deletion tests/database/filters/test_genotype_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def test_filter_genotypes_by_id(store: Store, test_genotype: Genotype, helpers:
# WHEN filtering genotypes by id
query: Query = store._get_query(Genotype)
genotypes: list[Genotype] = filter_genotypes_by_id(
genotype_id=test_genotype.id, genotypes=query
entry_id=test_genotype.id, genotypes=query
).all()

# THEN assert the genotype is returned
Expand Down

0 comments on commit 72e45f9

Please sign in to comment.