From 021df2e68a2a3947d5311034eeae0c04325d4b8b Mon Sep 17 00:00:00 2001 From: Anis SMAIL Date: Fri, 24 Jan 2025 15:49:14 +0100 Subject: [PATCH] fix(studies): use hybrid property instead of property --- antarest/study/model.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/antarest/study/model.py b/antarest/study/model.py index 4d4fa37900..3db617f829 100644 --- a/antarest/study/model.py +++ b/antarest/study/model.py @@ -30,6 +30,7 @@ PrimaryKeyConstraint, String, ) +from sqlalchemy.ext.hybrid import hybrid_property from sqlalchemy.orm import relationship # type: ignore from typing_extensions import override @@ -288,7 +289,7 @@ def __eq__(self, other: t.Any) -> bool: def to_json_summary(self) -> t.Any: return {"id": self.id, "name": self.name} - @property + @hybrid_property def path(self): return self._path @@ -296,7 +297,7 @@ def path(self): def path(self, path: str): self._path = normalize_path(path) - @property + @hybrid_property def folder(self): return self._folder