Skip to content

Commit a4f28bd

Browse files
committed
use change from issue-16
1 parent c7c2871 commit a4f28bd

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/anyvlm/storage/base_storage.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ def close(self) -> None:
2424
def wipe_db(self) -> None:
2525
"""Wipe all data from the storage backend."""
2626

27+
@property
28+
@abstractmethod
29+
def sanitized_url(self) -> str:
30+
"""Return a sanitized URL (password masked) of the database connection string."""
31+
2732
@abstractmethod
2833
def add_allele_frequencies(self, caf: CohortAlleleFrequencyStudyResult) -> None:
2934
"""Add allele frequency data to the database. Will skip conflicts.
@@ -34,8 +39,3 @@ def add_allele_frequencies(self, caf: CohortAlleleFrequencyStudyResult) -> None:
3439
3540
:param caf: Cohort allele frequency study result object to insert into the DB
3641
"""
37-
38-
@property
39-
@abstractmethod
40-
def sanitized_url(self) -> str:
41-
"""Return a sanitized URL (password masked) of the database connection string."""

src/anyvlm/storage/mappers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def from_db_entity(
4141
homozygotes = db_entity.ac_hom
4242
heterozygotes = db_entity.ac_het
4343
hemizygotes = db_entity.ac_hemi
44-
ac = sum((homozygotes or 0, heterozygotes or 0, hemizygotes or 0))
44+
ac = sum(x or 0 for x in (homozygotes, heterozygotes, hemizygotes))
4545
an = db_entity.an
4646

4747
return CohortAlleleFrequencyStudyResult(

0 commit comments

Comments
 (0)