mirror of https://gitlab.com/pamhyr/pamhyr2
BC, LC: Fix SQL export.
parent
88f1c15ab4
commit
94509a1638
|
|
@ -96,7 +96,10 @@ class BoundaryCondition(SQLSubModel):
|
|||
name = row[1],
|
||||
status = data['status']
|
||||
)
|
||||
bc.node = next(filter(lambda n: n.id == row[3], data["nodes"]))
|
||||
|
||||
bc.node = None
|
||||
if row[3] != -1:
|
||||
bc.node = next(filter(lambda n: n.id == row[3], data["nodes"]))
|
||||
|
||||
values = execute(
|
||||
"SELECT ind, data0, data1 FROM boundary_condition_data " +
|
||||
|
|
|
|||
|
|
@ -53,6 +53,8 @@ class BoundaryConditionList(SQLSubModel):
|
|||
return new
|
||||
|
||||
def _sql_save(self, execute, data = None):
|
||||
execute("DELETE FROM boundary_condition")
|
||||
|
||||
if data is None:
|
||||
data = {}
|
||||
|
||||
|
|
|
|||
|
|
@ -96,7 +96,9 @@ class LateralContribution(SQLSubModel):
|
|||
name = row[1],
|
||||
status = data['status']
|
||||
)
|
||||
lc.edge = next(filter(lambda e: e.id == row[3], data["edges"]))
|
||||
lc.edge = None
|
||||
if row[3] != -1:
|
||||
lc.edge = next(filter(lambda e: e.id == row[3], data["edges"]))
|
||||
lc._begin_kp = row[4]
|
||||
lc._end_kp = row[5]
|
||||
|
||||
|
|
|
|||
|
|
@ -51,6 +51,8 @@ class LateralContributionList(SQLSubModel):
|
|||
return new
|
||||
|
||||
def _sql_save(self, execute, data = None):
|
||||
execute("DELETE FROM lateral_contribution")
|
||||
|
||||
if data is None:
|
||||
data = {}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue