Skip to content

Commit 7c7982c

Browse files
committed
remove visualization df if invalid
1 parent ec5d036 commit 7c7982c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

petab/v1/core.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
from . import yaml
1717
from .C import * # noqa: F403
18+
from .visualize.lint import validate_visualization_df
1819

1920
logger = logging.getLogger(__name__)
2021
__all__ = [
@@ -299,6 +300,10 @@ def flatten_timepoint_specific_output_overrides(
299300
petab_problem.observable_df.index.name = OBSERVABLE_ID
300301
petab_problem.measurement_df = pd.concat(new_measurement_dfs)
301302

303+
# remove visualization df if it is invalid
304+
if not validate_visualization_df(petab_problem):
305+
petab_problem.visualization_df = None
306+
302307

303308
def unflatten_simulation_df(
304309
simulation_df: pd.DataFrame,

0 commit comments

Comments
 (0)