From edf69b64240ed0ff68e21eae98f2862696137046 Mon Sep 17 00:00:00 2001 From: Dominik Demuth Date: Wed, 29 Nov 2023 19:24:57 +0100 Subject: [PATCH] check if start parameter of fits are given; closes #157 --- src/gui_qt/fit/fitwindow.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gui_qt/fit/fitwindow.py b/src/gui_qt/fit/fitwindow.py index 9888685..9bb4db9 100644 --- a/src/gui_qt/fit/fitwindow.py +++ b/src/gui_qt/fit/fitwindow.py @@ -286,7 +286,10 @@ class QFitDialog(QtWidgets.QWidget, Ui_FitDialog): if model_name in data: parameter, _ = self._prepare(model_parameter, function_use=data[model_name], add_idx=isinstance(func, MultiModel)) - if parameter is None: + if parameter is None or not isinstance(parameter, dict): + return + + if ('data_parameter' not in parameter) or ('global_parameter' not in parameter): return for (data_parameter, _) in parameter['data_parameter'].values():