Skip to content

Commit

Permalink
incorrect params
Browse files Browse the repository at this point in the history
  • Loading branch information
kthare10 committed May 10, 2024
1 parent 1312eb8 commit b9e5222
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion fabric_cf/orchestrator/core/orchestrator_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -980,7 +980,7 @@ def get_metrics_overview(self, *, token: str = None, excluded_projects: List[str
active_states = SliceState.list_values_ex_closing_dead()
active_slice_count = controller.get_slice_count(states=active_states, user_id=user_id, project=project,
excluded_projects=excluded_projects)
non_active_metrics = controller.get_metrics(user_id=user_id, project_id=project,
non_active_metrics = controller.get_metrics(oidc_sub=user_id, project_id=project,
excluded_projects=excluded_projects)
total_slices = 0
for m in non_active_metrics:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ def metrics_overview_get(excluded_projects: List[str] = None) -> Metrics: # noq
metrics = handler.get_metrics_overview(token=token, excluded_projects=excluded_projects)
response = Metrics()
if metrics:
if isinstance(metrics.json_data, list):
response.results = metrics.json_data
if isinstance(metrics, list):
response.results = metrics
else:
response.results = [metrics.json_data]
response.results = [metrics]
else:
response.results = []

Expand Down

0 comments on commit b9e5222

Please sign in to comment.