Ensemble: Fix editing ensemble list.

This commit is contained in:
parouby committed 2026-08-12 16:46:13 +02:00
1 parent 4d4df1bde2
commit b203e8e062
3 files changed
+13 -12

No files matched your search

+7 -5
View File
@@ -29,9 +29,8 @@ logger = logging.getLogger()
class Ensemble(SQLSubModel):
_sub_classes = []
def __init__(self, id: int = -1,
name: str = "",
function=-1, range=[], target_data=None,
def __init__(self, id: int = -1, name: str = "",
function=None, range=[], target_data=None,
status=None, owner_scenario=-1):
super(Ensemble, self).__init__(
id=id, status=status,
@@ -157,9 +156,12 @@ class Ensemble(SQLSubModel):
brange, length = self._encode_range()
fid = self._function._pamhyr_id
if self._function._data_type == "generic":
if self._function is None:
fid = -1
else:
fid = self._function._pamhyr_id
if self._function._data_type == "generic":
fid = -1
data_pid = -1
if self._target_data is not None: