Skip to content

Commit

Permalink
Fix relpath calc
Browse files Browse the repository at this point in the history
  • Loading branch information
sed-i committed Dec 18, 2024
1 parent 5ee093a commit 4ca69ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/charms/grafana_agent/v0/cos_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,7 @@ def _dashboards(self) -> List[str]:
for path in Path(d).glob("*"):
with open(path, "rt") as fp:
dashboard = json.load(fp)
rel_path = str(path.relative_to(self._charm.charm_dir))
rel_path = str(path.relative_to(self._charm.charm_dir) if path.is_absolute() else path)
# COSAgentProvider is analogous to GrafanaDashboardProvider. We need to set the alt_uid so it represents
# the dashboard correctly across the ecosystem.
# https://github.com/canonical/grafana-k8s-operator/pull/363
Expand Down

0 comments on commit 4ca69ac

Please sign in to comment.