Results: Fix results export.

setup.py
Pierre-Antoine Rouby 2024-02-27 15:40:21 +01:00
parent 3e085dd7c6
commit 36b62260b1
1 changed files with 7 additions and 8 deletions

View File

@ -614,12 +614,11 @@ class ResultsWindow(PamhyrWindow):
quotechar='|', quoting=csv.QUOTE_MINIMAL)
writer.writerow(["timestamp", "z", "q"])
for profile in reach.profiles:
timestamps = self._results.get("timestamps")
timestamps = sorted(self._results.get("timestamps"))
for ts in timestamps:
writer.writerow([
ts,
profile.get_ts_key(ts, "Z"),
profile.get_ts_key(ts, "Q"),
])
for ts in timestamps:
writer.writerow([
ts,
profile.get_ts_key(ts, "Z"),
profile.get_ts_key(ts, "Q"),
])