From f9f3868b5d3f803de82683fc4af1032986ffcf64 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Sat, 21 Dec 2024 17:20:32 +0300 Subject: [PATCH] fix: owned_path recursion --- selfprivacy_api/services/templated_service.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/selfprivacy_api/services/templated_service.py b/selfprivacy_api/services/templated_service.py index 9f8dc12..f91d9b2 100644 --- a/selfprivacy_api/services/templated_service.py +++ b/selfprivacy_api/services/templated_service.py @@ -321,7 +321,7 @@ class ServiceMetaData(BaseSchema): user: Optional[str] = None group: Optional[str] = None folders: List[str] = [] - owned_folders: List[str] = [] + owned_folders: List[OwnedPath] = [] postgresql_databases: List[str] = [] license: List[License] = [] homepage: Optional[str] = None @@ -581,14 +581,14 @@ class TemplatedService(Service): def get_folders(self) -> List[str]: folders = self.meta.folders - owned_folders = self.get_owned_folders() + owned_folders = self.meta.owned_folders for folder in owned_folders: folders.append(folder.path) return folders def get_owned_folders(self) -> List[OwnedPath]: folders = self.meta.folders - owned_folders = self.get_owned_folders() + owned_folders = self.meta.owned_folders for folder in folders: owned_folders.append(self.owned_path(folder)) return owned_folders