We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fcf60ca commit 187181bCopy full SHA for 187181b
contentctl/objects/dashboard.py
@@ -104,7 +104,11 @@ def pretty_print_json_obj(self):
104
def getOutputFilepathRelativeToAppRoot(self, config: build) -> pathlib.Path:
105
# for clarity, the name of the dashboard file will follow the same convention
106
# as we use for detections, prefixing it with app_name -
107
- filename = f"{self.label(config)}.xml"
+ if self.file_path is None:
108
+ raise FileNotFoundError(
109
+ f"Dashboard {self.name} file_path was None. Dashboards must be backed by a file."
110
+ )
111
+ filename = f"{self.file_path.stem}.xml"
112
return pathlib.Path("default/data/ui/views") / filename
113
114
def writeDashboardFile(self, j2_env: Environment, config: build):
0 commit comments