Skip to content

Commit

Permalink
fix : also remove folderUID when creating templates
Browse files Browse the repository at this point in the history
  • Loading branch information
lilatomic committed Sep 20, 2024
1 parent 4eaec18 commit 59f80d9
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions docs/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Changelog
=========

* fix : also remove folderUID when creating templates
* feature : caching in finder
* feature : `FlowResult.ensure_success` for inline raising flow exceptions
* feature : `FileStore.resolve_object_to_filepath` has the type of object being referenced, allowing separate folders for alerts and dashboards
Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ ignore =
W191
E133
E741
D401
per-file-ignores =
setup.py:E501
tests/*:D101,D102,D103,D100
Expand Down
2 changes: 1 addition & 1 deletion src/grafanarmadillo/flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

from grafanarmadillo.alerter import Alerter
from grafanarmadillo.dashboarder import Dashboarder
from grafanarmadillo.find import Finder, CacheMode
from grafanarmadillo.find import CacheMode, Finder
from grafanarmadillo.templator import Templator
from grafanarmadillo.types import PathLike
from grafanarmadillo.util import resolve_object_to_filepath
Expand Down
2 changes: 1 addition & 1 deletion src/grafanarmadillo/templator.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def make_template_from_dashboard(
"""Convert a dashboard into a one ready for templating."""
new = dashboard.copy()
new = project_dict(
new, {"id", "uid"}, inverse=True
new, {"id", "uid", "folderUID"}, inverse=True
) # we don't erase the title so that we can template it later

return self.make_template(DashboardContent(new))
Expand Down

0 comments on commit 59f80d9

Please sign in to comment.