Skip to content

Fix #878: prevent doesAlarmExist crash for missing alarms#892

Open
Rahul-2k4 wants to merge 3 commits intoCCExtractor:mainfrom
Rahul-2k4:issue878-does-alarm-exist-crash
Open

Fix #878: prevent doesAlarmExist crash for missing alarms#892
Rahul-2k4 wants to merge 3 commits intoCCExtractor:mainfrom
Rahul-2k4:issue878-does-alarm-exist-crash

Conversation

@Rahul-2k4
Copy link

Summary

  • replace the doesAlarmExist list lookup with a null-safe findFirst() query
  • remove the empty-result crash path when an alarm ID is missing from Isar
  • add a regression test for the missing-alarm case

Test Plan

  • flutter test test/app/data/providers/isar_provider_test.dart

Closes #878

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: RangeError crash in doesAlarmExist when alarm ID doesn't exist in DB

1 participant