diff --git a/backend/api/routes/projects.py b/backend/api/routes/projects.py index fc74507..b28398a 100644 --- a/backend/api/routes/projects.py +++ b/backend/api/routes/projects.py @@ -154,7 +154,11 @@ def __init__(self, data: list[dict[str, str | list[str]]]): self.data = data self.files_indexes: dict[str, int] = {} for index, entry in enumerate(self.data): - for filename in entry.get("files", []): + for fileentry in entry.get("files", []): + if isinstance(fileentry, str): + filename = fileentry + else: + filename = fileentry["filename"] self.files_indexes[filename] = index def __getitem__(self, key: str):