mirror of https://gitlab.com/pamhyr/pamhyr2
debug incomplete database
parent
2d3747b3d3
commit
8c697a9621
|
|
@ -128,7 +128,8 @@ class BoundaryCondition(SQLSubModel):
|
||||||
|
|
||||||
bc.node = None
|
bc.node = None
|
||||||
if row[3] != -1:
|
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(
|
values = execute(
|
||||||
"SELECT ind, data0, data1 FROM boundary_condition_data " +
|
"SELECT ind, data0, data1 FROM boundary_condition_data " +
|
||||||
|
|
|
||||||
|
|
@ -106,8 +106,13 @@ class BoundaryConditionAdisTS(SQLSubModel):
|
||||||
|
|
||||||
bc.node = None
|
bc.node = None
|
||||||
if row[3] != -1:
|
if row[3] != -1:
|
||||||
bc.node = next(filter(
|
tmp = next(filter(
|
||||||
lambda n: n.id == row[3], data["nodes"])).id
|
lambda n: n.id == row[3], data["nodes"]),
|
||||||
|
None)
|
||||||
|
if tmp != None:
|
||||||
|
bc.node = tmp.id
|
||||||
|
else:
|
||||||
|
bc.node = -1
|
||||||
|
|
||||||
values = execute(
|
values = execute(
|
||||||
"SELECT data0, data1 FROM " +
|
"SELECT data0, data1 FROM " +
|
||||||
|
|
|
||||||
|
|
@ -146,7 +146,12 @@ class TableModel(PamhyrTableModel):
|
||||||
n = data[row].node
|
n = data[row].node
|
||||||
if n is None:
|
if n is None:
|
||||||
return self._trad["not_associated"]
|
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":
|
elif self._headers[column] == "pol":
|
||||||
n = data[row].pollutant
|
n = data[row].pollutant
|
||||||
if n is None or n == "not_associated" or n == "":
|
if n is None or n == "not_associated" or n == "":
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue