mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
debug incomplete database
This commit is contained in:
1 parent
2d3747b3d3
commit
8c697a9621
3 files changed
+15
-4
No files matched your search
@@ -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 == "":
|
||||
|
||||
Reference in new issue
Block a user