mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix typo causing book specific link map to contain entries for all items
This commit is contained in:
parent
00832ca25b
commit
899ffb4e61
@ -2387,9 +2387,12 @@ class Cache:
|
||||
links = {}
|
||||
def add_links_for_field(f):
|
||||
table = self.fields[f].table
|
||||
field_ids = self._field_ids_for(f, book_id)
|
||||
if field_ids:
|
||||
lm = table.link_map
|
||||
id_link_map = {fid:lm.get(fid) for fid in field_ids}
|
||||
vm = table.id_map
|
||||
d = {vm.get(fid):v for fid, v in lm.items() if v}
|
||||
d = {vm.get(fid):v for fid, v in id_link_map.items() if v}
|
||||
d.pop(None, None)
|
||||
if d:
|
||||
links[f] = d
|
||||
|
Loading…
x
Reference in New Issue
Block a user