mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
get_link_map() should not have None keys
This commit is contained in:
parent
4e8006a0da
commit
235ea54a5c
@ -2533,7 +2533,9 @@ class Cache:
|
|||||||
raise ValueError(f"Lookup name {for_field} doesn't have a link map")
|
raise ValueError(f"Lookup name {for_field} doesn't have a link map")
|
||||||
lm = table.link_map
|
lm = table.link_map
|
||||||
vm = table.id_map
|
vm = table.id_map
|
||||||
return {vm.get(fid):v for fid,v in lm.items() if v}
|
ans = {vm.get(fid):v for fid,v in lm.items() if v}
|
||||||
|
ans.pop(None)
|
||||||
|
return ans
|
||||||
|
|
||||||
@read_api
|
@read_api
|
||||||
def link_for(self, field, item_id):
|
def link_for(self, field, item_id):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user