mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
debug AdisTS
This commit is contained in:
1 parent
012408d19e
commit
f3c461cbd9
3 files changed
+22
-7
No files matched your search
@@ -307,6 +307,21 @@ class Pollutants(SQLSubModel):
|
||||
def data(self):
|
||||
return self._data
|
||||
|
||||
@data.setter
|
||||
def data(self, data):
|
||||
self._data = [PollutantCharacteristics(type=int(data[0]),
|
||||
diametre=float(data[1]),
|
||||
rho=float(data[2]),
|
||||
porosity=float(data[3]),
|
||||
cdc_riv=float(data[4]),
|
||||
cdc_cas=float(data[5]),
|
||||
apd=float(data[6]),
|
||||
ac=float(data[7]),
|
||||
bc=float(data[8]),
|
||||
pollutant=self,
|
||||
status=self._status
|
||||
)]
|
||||
|
||||
@classmethod
|
||||
def _db_create(cls, execute, ext=""):
|
||||
execute(f"""
|
||||
@@ -397,7 +412,7 @@ class Pollutants(SQLSubModel):
|
||||
|
||||
data["pollutant"] = new_pollutant
|
||||
new_pollutant._data = PollutantCharacteristics._db_load(
|
||||
execute, data.copy()
|
||||
execute, data=data
|
||||
)
|
||||
|
||||
loaded.add(pid)
|
||||
@@ -421,7 +436,7 @@ class Pollutants(SQLSubModel):
|
||||
f"AND scenario = {self._status.scenario_id}"
|
||||
)
|
||||
execute(
|
||||
f"DELETE FROM pollutants_characteristics " +
|
||||
"DELETE FROM pollutants_characteristics " +
|
||||
f"WHERE pollutant = {self.id} " +
|
||||
f"AND scenario = {self._status.scenario_id}"
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user