From 0a375ded96b40b8192fc9fc9cc683c03d77b8b16 Mon Sep 17 00:00:00 2001 From: Alinson Xavier Date: Sun, 4 Jun 2017 17:07:07 -0400 Subject: [PATCH] Silently ignore missing habits --- .../org/isoron/uhabits/models/sqlite/SQLiteHabitList.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/src/main/java/org/isoron/uhabits/models/sqlite/SQLiteHabitList.java b/app/src/main/java/org/isoron/uhabits/models/sqlite/SQLiteHabitList.java index 507121d61..397299827 100644 --- a/app/src/main/java/org/isoron/uhabits/models/sqlite/SQLiteHabitList.java +++ b/app/src/main/java/org/isoron/uhabits/models/sqlite/SQLiteHabitList.java @@ -270,9 +270,7 @@ public class SQLiteHabitList extends HabitList for (HabitRecord record : recordList) { Habit habit = getById(record.getId()); - if (habit == null) - throw new RuntimeException("habit not in database"); - + if (habit == null) continue; if (!filter.matches(habit)) continue; habits.add(habit); }