mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
Ensemble: Fix editing ensemble list.
This commit is contained in:
1 parent
4d4df1bde2
commit
b203e8e062
3 files changed
+13
-12
No files matched your search
@@ -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:
|
||||
|
||||
Reference in new issue
Block a user