From ea1bf2caa3d5003369f8651d36110c1041d1dbce Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 27 May 2020 14:03:36 +0100 Subject: [PATCH] Ensure that a theme exists before setting it --- daemon.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/daemon.py b/daemon.py index 2a7e0bd1b..285553596 100644 --- a/daemon.py +++ b/daemon.py @@ -5807,8 +5807,9 @@ class PubServer(BaseHTTPRequestHandler): os.remove(self.server.baseDir + '/fonts/custom.' + ext + '.etag') - setTheme(self.server.baseDir, - getTheme(self.server.baseDir)) + currTheme = getTheme(self.server.baseDir) + if currTheme: + setTheme(self.server.baseDir, currTheme) if fields.get('mediaInstance'): self.server.mediaInstance = False