mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Content server: Fix deletion of viewer profiles not working
This commit is contained in:
parent
8bb265ae6a
commit
a8a3bc9844
@ -332,8 +332,8 @@ def save_reader_profile(ctx, rd):
|
|||||||
try:
|
try:
|
||||||
data = load_json_file(rd.request_body_file)
|
data = load_json_file(rd.request_body_file)
|
||||||
name, profile = data['name'], data['profile']
|
name, profile = data['name'], data['profile']
|
||||||
if not isinstance(profile, dict):
|
if not isinstance(profile, dict) and profile is not None:
|
||||||
raise TypeError('profile must be a dict')
|
raise TypeError(f'profile must be a dict not {type(profile)}')
|
||||||
except Exception as err:
|
except Exception as err:
|
||||||
raise HTTPBadRequest(f'Invalid query: {err}')
|
raise HTTPBadRequest(f'Invalid query: {err}')
|
||||||
from calibre.gui2.viewer.config import save_viewer_profile
|
from calibre.gui2.viewer.config import save_viewer_profile
|
||||||
|
Loading…
x
Reference in New Issue
Block a user