debug incomplete database

adists_release
Theophile Terraz 2024-12-09 09:03:02 +01:00
parent 2d3747b3d3
commit 8c697a9621
3 changed files with 15 additions and 4 deletions

View File

@ -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 " +

View File

@ -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 " +

View File

@ -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 == "":