Skip to content

Commit 54472ce

Browse files
Forbid interpolate to mesh when not forking (#1483) (#1486)
* Forbid interpolate to mesh when not forking * Change error type * Fix lint Co-authored-by: Ben <106089368+benflexcompute@users.noreply.github.com>
1 parent 1397777 commit 54472ce

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

flow360/component/project.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,12 @@
4848
wrapstring,
4949
)
5050
from flow360.component.volume_mesh import VolumeMeshV2
51-
from flow360.exceptions import Flow360FileError, Flow360ValueError, Flow360WebError
51+
from flow360.exceptions import (
52+
Flow360ConfigError,
53+
Flow360FileError,
54+
Flow360ValueError,
55+
Flow360WebError,
56+
)
5257
from flow360.log import log
5358
from flow360.plugins.report.report import get_default_report_summary_template
5459
from flow360.version import __solver_version__
@@ -1687,6 +1692,12 @@ def run_case(
16871692
Case | Draft
16881693
The case asset or the draft if `draft_only` is True.
16891694
"""
1695+
1696+
if interpolate_to_mesh is not None and fork_from is None:
1697+
raise Flow360ConfigError(
1698+
"Interpolation to mesh is only supported when forking from a case."
1699+
)
1700+
16901701
self._check_initialized()
16911702
case_or_draft = self._run(
16921703
params=params,

0 commit comments

Comments
 (0)