mirror of https://gitlab.com/pamhyr/pamhyr2
HS: Minor fix add method.
parent
4c5281ea30
commit
e41c23120a
|
|
@ -24,6 +24,9 @@ from Model.Tools.PamhyrDB import SQLSubModel
|
||||||
from Model.Except import NotImplementedMethodeError
|
from Model.Except import NotImplementedMethodeError
|
||||||
|
|
||||||
from Model.HydraulicStructures.Basic.HydraulicStructures import BasicHS
|
from Model.HydraulicStructures.Basic.HydraulicStructures import BasicHS
|
||||||
|
from Model.HydraulicStructures.Basic.Types import (
|
||||||
|
NotDefined,
|
||||||
|
)
|
||||||
|
|
||||||
logger = logging.getLogger()
|
logger = logging.getLogger()
|
||||||
|
|
||||||
|
|
@ -231,7 +234,7 @@ class HydraulicStructure(SQLSubModel):
|
||||||
return self._data.copy()
|
return self._data.copy()
|
||||||
|
|
||||||
def add(self, index: int):
|
def add(self, index: int):
|
||||||
value = BasicHS(status=self._status)
|
value = NotDefined(status=self._status)
|
||||||
self._data.insert(index, value)
|
self._data.insert(index, value)
|
||||||
self._status.modified()
|
self._status.modified()
|
||||||
return value
|
return value
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue