From: Jakob Cornell Date: Sat, 4 Jan 2020 07:18:33 +0000 (-0600) Subject: Detect stale current student on startup X-Git-Url: https://jcornell.net/gitweb/gitweb.cgi?a=commitdiff_plain;h=52d657c44b38c58768a850defd67bd5ed50fa7ce;p=tutoring-tool.git Detect stale current student on startup --- 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