From 9f9b8dbaaf6eca7c1755657b13919d028179ad9c Mon Sep 17 00:00:00 2001 From: gitjannes Date: Thu, 12 Dec 2024 16:08:57 +0100 Subject: [PATCH] a tag with standard name can now be added to runs, it is displayed in the filters. --- protzilla/run_v2.py | 2 +- ui/runs/views.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/protzilla/run_v2.py b/protzilla/run_v2.py index b8b4da79..ff41b6fd 100644 --- a/protzilla/run_v2.py +++ b/protzilla/run_v2.py @@ -27,7 +27,7 @@ def get_available_runinfo() -> tuple[list[dict[str, str | list[str]]], list[dict return [] runs = [] runs_favourited = [] - all_tags = {} + all_tags = set() for directory in paths.RUNS_PATH.iterdir(): if directory.name.startswith("."): continue diff --git a/ui/runs/views.py b/ui/runs/views.py index 6d5d423f..6b6f4ac1 100644 --- a/ui/runs/views.py +++ b/ui/runs/views.py @@ -263,7 +263,7 @@ def add_tag(request: HttpRequest): tags = metadata.get("tags") tags.append(run_tag) metadata["tags"]= tags - yaml_operator.write(metadata_yaml_path, metadata) + yaml_operator.write(Path(metadata_yaml_path), metadata) return HttpResponseRedirect(reverse("runs:index"))