diff --git a/.gitignore b/.gitignore index b418743..3ec2fb9 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,7 @@ coverage.xml .hypothesis/ .pytest_cache/ cover/ + +**/local_backups/** +**/*.yaml +**/*.csv \ No newline at end of file diff --git a/scripts/backup.py b/scripts/backup.py index 6e335c7..afd7e65 100644 --- a/scripts/backup.py +++ b/scripts/backup.py @@ -321,8 +321,9 @@ def store_automations(api: GDApi, export_path: Path, org_id: str, ws_id: str) -> os.mkdir(automations_folder_path) # Store the automations in a JSON file - with open(automations_file_path, "w") as f: - json.dump(automations, f) + if len(automations["data"]) > 0: + with open(automations_file_path, "w") as f: + json.dump(automations, f) def store_declarative_automations(