[Calibre] preserve uuid field in calibre metadata serialisation (#15088)

Otherwise calibre wil raise an error when its nil:

```
calibre, version 9.4.0
ERROR: Error: Error communicating with device

'uuid'

Traceback (most recent call last):
  File "calibre/gui2/device.py", line 110, in run
  File "calibre/gui2/device.py", line 581, in _books
  File "calibre/devices/smart_device_app/driver.py", line 58, in _synchronizer
  File "calibre/devices/smart_device_app/driver.py", line 1316, in books
KeyError: 'uuid'
```
This commit is contained in:
David authored and GitHub committed 2026-03-08 09:11:27 +01:00
1 parent 5cd27cff1d
commit 33654af8a7
1 file changed
+1 -1
+1 -1
View File
@@ -45,7 +45,7 @@ local function slim(book, is_search)
elseif k == "tags" or k == "authors" then
slim_book[k] = book[k] or rapidjson.array({})
else
slim_book[k] = book[k]
slim_book[k] = book[k] or rapidjson.null
end
end
return slim_book