Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Dashboard User relationships raised 404s also #1965

Merged
merged 1 commit into from
Aug 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion metadata/metadata_service/api/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ def get(self, user_id: str) -> Iterable[Union[Mapping, int, None]]:

return result, HTTPStatus.OK

except NotFoundException:
except NotFoundException as e:
LOGGER.exception(e)
return {'message': 'user_id {} does not exist'.format(user_id)}, HTTPStatus.NOT_FOUND

except Exception:
Expand Down
6 changes: 0 additions & 6 deletions metadata/metadata_service/proxy/neo4j_proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -1566,12 +1566,6 @@ def get_dashboard_by_user_relation(self, *, user_email: str, relation_type: User

records = self._execute_cypher_query(statement=query, param_dict={'user_key': user_email})

if not records:
raise NotFoundException('User {user_id} does not {relation} on {resource_type} resources'.format(
user_id=user_email,
relation=relation_type,
resource_type=ResourceType.Dashboard.name))

results = []
for record in records:
results.append(DashboardSummary(
Expand Down