From 52d657c44b38c58768a850defd67bd5ed50fa7ce Mon Sep 17 00:00:00 2001 From: Jakob Cornell Date: Sat, 4 Jan 2020 01:18:33 -0600 Subject: [PATCH] Detect stale current student on startup --- main.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.py b/main.py index 3e87b46..e63d623 100644 --- a/main.py +++ b/main.py @@ -89,6 +89,8 @@ class MainModel(Model): self.state_mgr = state_mgr state = self.state_mgr.load() self.state = state or new_app_state() + if self.state['student'] is not None and self.state['student'] not in self.data: + self.state['student'] = None self.saved = False self.dirty = False -- 2.30.2