Commit 352c0beb authored by Theophile Terraz's avatar Theophile Terraz
Browse files

add short dict and getter in HS

Showing with 8 additions and 0 deletions
+8 -0
......@@ -35,3 +35,8 @@ class NotDefined(BasicHS):
BHSValue("bar", float, 42.0),
BHSValue("baz", int, 13),
]
BHS_types = {
"ND": NotDefined,
}
......@@ -233,6 +233,9 @@ class HydraulicStructure(SQLSubModel):
def basic_structures(self):
return self._data.copy()
def basic_structure(self, index: int):
return self._data[index]
def add(self, index: int):
value = NotDefined(status=self._status)
self._data.insert(index, value)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment