mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
Fix problem when CC accesses the content server with the option device_for_template. Fixes exception
Traceback (most recent call last): File "C:\CBH_Data\calibre.git\calibre_dev\src\calibre\srv\ajax.py", line 141, in book_to_json File "C:\CBH_Data\calibre.git\calibre_dev\src\calibre\devices\utils.py", line 98, in create_upload_path File "C:\CBH_Data\calibre.git\calibre_dev\src\calibre\utils\filenames.py", line 40, in ascii_filename File "C:\CBH_Data\calibre.git\calibre_dev\src\calibre\utils\filenames.py", line 30, in ascii_text AttributeError: 'int' object has no attribute 'decode'
This commit is contained in:
parent
1c22094803
commit
e8afb87d9d
@ -135,7 +135,7 @@ def book_to_json(ctx, rd, db, book_id,
|
||||
for device_class in device_plugins():
|
||||
if device_class.__class__.__name__ == device_for_template:
|
||||
template = device_class.save_template()
|
||||
data['_filename_'] = create_upload_path(mi, book_id,
|
||||
data['_filename_'] = create_upload_path(mi, unicode(book_id),
|
||||
template, sanitize, path_type=posixpath)
|
||||
break
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user