Skip to content

Commit

Permalink
Fix issue with decoding metrics JSON
Browse files Browse the repository at this point in the history
  • Loading branch information
hunteraraujo committed Sep 25, 2023
1 parent a6446ce commit 470cfa6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion frontend/lib/models/benchmark/metrics.dart
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ class Metrics {
difficulty: json['difficulty'] ?? "",
success: json['success'],
attempted: json['attempted'],
successPercentage: json['success_percentage'].toDouble() ?? 0.0,
successPercentage: (json['success_percentage'] != null)
? json['success_percentage'].toDouble()
: 0.0,
cost: json['cost'] ?? "",
runTime: json['run_time'] ?? "",
);
Expand Down

0 comments on commit 470cfa6

Please sign in to comment.