From 793a2dfd75356b63d00cfe24dcc4fe72fd9da9c0 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 5 Jan 2024 16:49:50 +0000 Subject: [PATCH] Add readers if needed --- reading.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/reading.py b/reading.py index 82c0118b8..b01a23283 100644 --- a/reading.py +++ b/reading.py @@ -265,6 +265,8 @@ def remove_reading_event(base_dir: str, readers_path + '/' + actor.replace('/', '#') + '.json' reader_books_json = {} + if 'readers' not in books_cache: + books_cache['readers'] = {} if books_cache['readers'].get(actor): reader_books_json = books_cache['readers'][actor] elif os.path.isfile(reader_books_filename):