[Store] Fix event query

This commit is contained in:
Christian 2019-09-03 11:42:13 +00:00 committed by Marcel
parent 902df33d50
commit c06e4d0b50

View file

@ -398,7 +398,7 @@ class Store {
/// Searches for the event in the store. /// Searches for the event in the store.
Future<Event> getEventById(String eventID, Room room) async { Future<Event> getEventById(String eventID, Room room) async {
List<Map<String, dynamic>> res = await db.rawQuery( List<Map<String, dynamic>> res = await db.rawQuery(
"SELECT * FROM Events WHERE id=? AND room_id=?", [eventID, room.id]); "SELECT * FROM Events WHERE event_id=? AND room_id=?", [eventID, room.id]);
if (res.length == 0) return null; if (res.length == 0) return null;
return Event.fromJson(res[0], room); return Event.fromJson(res[0], room);
} }