Ensure that a theme exists before setting it

main
Bob Mottram 2020-05-27 14:03:36 +01:00
parent 54224094a9
commit ea1bf2caa3
1 changed files with 3 additions and 2 deletions

View File

@ -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