Commit 8c697a96 authored by Theophile Terraz's avatar Theophile Terraz
Browse files

debug incomplete database

No related merge requests found
Pipeline #61148 passed with stages
in 1 minute and 2 seconds
Showing with 15 additions and 4 deletions
+15 -4
......@@ -128,7 +128,8 @@ class BoundaryCondition(SQLSubModel):
bc.node = None
if row[3] != -1:
bc.node = next(filter(lambda n: n.id == row[3], data["nodes"]))
bc.node = next(filter(lambda n: n.id == row[3], data["nodes"]),
None)
values = execute(
"SELECT ind, data0, data1 FROM boundary_condition_data " +
......
......@@ -106,8 +106,13 @@ class BoundaryConditionAdisTS(SQLSubModel):
bc.node = None
if row[3] != -1:
bc.node = next(filter(
lambda n: n.id == row[3], data["nodes"])).id
tmp = next(filter(
lambda n: n.id == row[3], data["nodes"]),
None)
if tmp != None:
bc.node = tmp.id
else:
bc.node = -1
values = execute(
"SELECT data0, data1 FROM " +
......
......@@ -146,7 +146,12 @@ class TableModel(PamhyrTableModel):
n = data[row].node
if n is None:
return self._trad["not_associated"]
return next(filter(lambda x: x.id == n, self._data._nodes)).name
tmp = next(filter(lambda x: x.id == n, self._data._nodes),
None)
if tmp != None:
return tmp.name
else:
return self._trad["not_associated"]
elif self._headers[column] == "pol":
n = data[row].pollutant
if n is None or n == "not_associated" or n == "":
......
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