mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
Results: Fix add data settings.
This commit is contained in:
1 parent
9b0bdd1e63
commit
874f592cf4
1 file changed
+11
-5
@@ -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):
|
||||
|
||||
Reference in new issue
Block a user