Skip to content

Commit

Permalink
fix(studies): use hybrid property instead of property
Browse files Browse the repository at this point in the history
  • Loading branch information
Anis SMAIL committed Jan 24, 2025
1 parent 282fcd6 commit 021df2e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions antarest/study/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -288,15 +289,15 @@ 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

@path.setter
def path(self, path: str):
self._path = normalize_path(path)

@property
@hybrid_property
def folder(self):
return self._folder

Expand Down

0 comments on commit 021df2e

Please sign in to comment.