diff --git a/lib/models/relapse.dart b/lib/models/relapse.dart index 2e65f51..0271d31 100644 --- a/lib/models/relapse.dart +++ b/lib/models/relapse.dart @@ -10,7 +10,7 @@ class Relapse implements DatabaseRecord { @override factory Relapse.fromDatabase(Map map) { DateTime date = DateTime.parse(map['date']); - return Relapse(map['_category'], map['comment'], date); + return Relapse(map['category'], map['comment'], date); } @override @@ -21,6 +21,7 @@ class Relapse implements DatabaseRecord { @override Map toMap() { return { + 'category': _category, 'comment': _comment, 'date': _date.toIso8601String(), };