Results: Fix add data settings.

scenario-dev-pa
Pierre-Antoine 2025-11-04 14:18:00 +01:00
parent 9b0bdd1e63
commit 874f592cf4
1 changed files with 11 additions and 5 deletions

View File

@ -116,15 +116,16 @@ class AdditionalData(SQLSubModel):
y = struct.unpack(data_format, by)
data = {
'type_x': tmp_dict[data_type[2]],
'type_y': tmp_dict[data_type[0]],
'type_x': type_x,
'type_y': type_y,
'legend': legend,
'unit': tmp_unit[data_type[0]],
'unit': unit,
'x': x, 'y': y
}
new_results = cls(study=study)
new.append(new_results)
new_data = cls(study=study)
new_data._data = data
new.append(new_data)
return new
@ -310,6 +311,11 @@ class Results(SQLSubModel):
data["timestamps"] = sorted(ts)
new_results._river = River._db_load(execute, data)
new_results.set(
"additional_data",
AdditionalData._db_load(execute, data)
)
yield (solver_type, new_results)
def _db_save_clear(self, execute, solver_type, data=None):