mirror of https://gitlab.com/pamhyr/pamhyr2
Results: Fix add data settings.
parent
9b0bdd1e63
commit
874f592cf4
|
|
@ -116,15 +116,16 @@ class AdditionalData(SQLSubModel):
|
||||||
y = struct.unpack(data_format, by)
|
y = struct.unpack(data_format, by)
|
||||||
|
|
||||||
data = {
|
data = {
|
||||||
'type_x': tmp_dict[data_type[2]],
|
'type_x': type_x,
|
||||||
'type_y': tmp_dict[data_type[0]],
|
'type_y': type_y,
|
||||||
'legend': legend,
|
'legend': legend,
|
||||||
'unit': tmp_unit[data_type[0]],
|
'unit': unit,
|
||||||
'x': x, 'y': y
|
'x': x, 'y': y
|
||||||
}
|
}
|
||||||
|
|
||||||
new_results = cls(study=study)
|
new_data = cls(study=study)
|
||||||
new.append(new_results)
|
new_data._data = data
|
||||||
|
new.append(new_data)
|
||||||
|
|
||||||
return new
|
return new
|
||||||
|
|
||||||
|
|
@ -310,6 +311,11 @@ class Results(SQLSubModel):
|
||||||
data["timestamps"] = sorted(ts)
|
data["timestamps"] = sorted(ts)
|
||||||
new_results._river = River._db_load(execute, data)
|
new_results._river = River._db_load(execute, data)
|
||||||
|
|
||||||
|
new_results.set(
|
||||||
|
"additional_data",
|
||||||
|
AdditionalData._db_load(execute, data)
|
||||||
|
)
|
||||||
|
|
||||||
yield (solver_type, new_results)
|
yield (solver_type, new_results)
|
||||||
|
|
||||||
def _db_save_clear(self, execute, solver_type, data=None):
|
def _db_save_clear(self, execute, solver_type, data=None):
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue