From db448dcdf75e3c1dc16e4e2f235f6a6586e992bd Mon Sep 17 00:00:00 2001 From: Ben <106089368+benflexcompute@users.noreply.github.com> Date: Thu, 19 Jun 2025 11:24:47 -0400 Subject: [PATCH] Fixed a V1 issue where the caseMeta class have different projectID access (#1178) --- flow360/component/case.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/flow360/component/case.py b/flow360/component/case.py index 3760a0469..96f1ce04b 100644 --- a/flow360/component/case.py +++ b/flow360/component/case.py @@ -542,6 +542,18 @@ def info(self) -> CaseMeta: return super().info @property +<<<<<<< HEAD +======= + def project_id(self) -> Optional[str]: + """Returns the project id of the case if case was run with V2 interface.""" + if isinstance(self.info, CaseMeta): + return self.info.projectId + if isinstance(self.info, CaseMetaV2): + return self.info.project_id + raise ValueError("Case info is not of type CaseMeta or CaseMetaV2") + + @property +>>>>>>> 4c3d28a6 (Fixed a V1 issue where the caseMeta class have different projectID access (#1178)) def volume_mesh(self) -> "VolumeMeshV2": """ returns volume mesh