Skip to content

Commit

Permalink
fix: get all tags should work for all resources (#175)
Browse files Browse the repository at this point in the history
Signed-off-by: Tao Feng <[email protected]>
  • Loading branch information
feng-tao authored Aug 21, 2020
1 parent 369685c commit cf1ab6d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions metadata_service/proxy/neo4j_proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -673,8 +673,8 @@ def get_tags(self) -> List:
# todo: Currently all the tags are default type, we could open it up if we want to include badge
query = textwrap.dedent("""
MATCH (t:Tag{tag_type: 'default'})
OPTIONAL MATCH (tbl:Table)-[:TAGGED_BY]->(t)
RETURN t as tag_name, count(distinct tbl.key) as tag_count
OPTIONAL MATCH (resource)-[:TAGGED_BY]->(t)
RETURN t as tag_name, count(distinct resource.key) as tag_count
""")

records = self._execute_cypher_query(statement=query,
Expand Down
5 changes: 3 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ mock==2.0.0
# Mypy is an optional static type checker for Python.
# License: MIT
# Upstream url: https://github.com/python/mypy
mypy==0.660
mypy==0.782

# Thin-wrapper around the mock package for easier use with py.test.
# License: MIT
Expand Down Expand Up @@ -60,7 +60,7 @@ marshmallow-annotations==2.4.0
MarkupSafe==1.1
pytz==2018.4
six==1.11.0
Werkzeug==0.15.3
Werkzeug==0.15.5
wheel==0.33.1
neo4j==1.7.6
neotime==1.7.1
Expand All @@ -72,3 +72,4 @@ beaker>=1.10.0
mocket==3.7.3
overrides==2.5
websocket-client==0.56.0
typed-ast==1.4.1
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from setuptools import setup, find_packages

__version__ = '2.5.4'
__version__ = '2.5.5'


requirements_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'requirements.txt')
Expand Down

0 comments on commit cf1ab6d

Please sign in to comment.