Skip to content

Commit

Permalink
make export more robust
Browse files Browse the repository at this point in the history
  • Loading branch information
GliderGeek committed May 24, 2023
1 parent c2e2aa2 commit 56b9c7d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Master

[unreleased]
- made export more robust when certain attributes not present

v0.63.0 - 2023-05-20
- updated python, dependencies and actions to latest
Expand Down
8 changes: 4 additions & 4 deletions PySoar/exportClass.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,18 +119,18 @@ def determine_best_worst(self, competition_day, settings):
self.worst_parameters_all[perf_ind] = filename

# check for best value
if order == "high" and (value > temp_best or (value < 0 and value < temp_best)):
if order == "high" and value is not None and (value > temp_best or (value < 0 and value < temp_best)):
temp_best = value
self.best_parameters_all[perf_ind] = filename
elif order == "low" and value < temp_best:
elif order == "low" and value is not None and value < temp_best:
temp_best = value
self.best_parameters_all[perf_ind] = filename

# check for worst value
if order == 'high' and 0 < value < temp_worst:
if order == 'high' and value is not None and 0 < value < temp_worst:
temp_worst = value
self.worst_parameters_all[perf_ind] = filename
elif order == "low" and value > temp_worst:
elif order == "low" and value is not None and value > temp_worst:
temp_worst = value
self.worst_parameters_all[perf_ind] = filename

Expand Down

0 comments on commit 56b9c7d

Please sign in to comment.