Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
Signed-off-by: derdilla <[email protected]>
  • Loading branch information
derdilla committed Sep 17, 2023
1 parent 8ad519d commit 3087e87
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/model/blood_pressure.dart
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,14 @@ class BloodPressureModel extends ChangeNotifier {
List<BloodPressureRecord> records = [];
for (var e in dbResult) {
final needlePinJson = e['needlePin'] as String?;
final needlePin = (needlePinJson != null) ? jsonDecode(needlePinJson) : null;
records.add(BloodPressureRecord(
DateTime.fromMillisecondsSinceEpoch(e['timestamp'] as int),
e['systolic'] as int?,
e['diastolic'] as int?,
e['pulse'] as int?,
e['notes'].toString(),
needlePin: (needlePinJson == null) ? null : MeasurementNeedlePin.fromJson(jsonDecode(needlePinJson))
needlePin: (needlePin != null) ? MeasurementNeedlePin.fromJson(needlePin) : null
));
}
return records;
Expand Down

0 comments on commit 3087e87

Please sign in to comment.