Skip to content

Commit

Permalink
Merge pull request #41 from cancervariants/issue-40
Browse files Browse the repository at this point in the history
Issue 40
  • Loading branch information
korikuzma authored Mar 31, 2021
2 parents 4286db8 + a494cdb commit f0ccefc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gene/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
logger.setLevel(logging.DEBUG)


__version__ = "0.1.4"
__version__ = "0.1.5"


class DownloadException(Exception):
Expand Down
8 changes: 6 additions & 2 deletions gene/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,12 @@ def search_sources(self, query_str: str, keyed: bool = False,
provided, or if invalid source names are given.
:return: dict containing all matches found in sources.
"""
sources = {name.value.lower(): name.value for name in
SourceName.__members__.values()}
possible_sources = {name.value.lower(): name.value for name in
SourceName.__members__.values()}
sources = dict()
for k, v in possible_sources.items():
if self.db.metadata.get_item(Key={'src_name': v}).get('Item'):
sources[k] = v

if not incl and not excl:
query_sources = set(sources.values())
Expand Down

0 comments on commit f0ccefc

Please sign in to comment.