mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-04-24 23:53:07 +02:00
Bug #1519599: search/replace on a custom series column resets the index.
Kovid: as you can see the problem is in db.cache.set_field. I fixed it by using the custom series index if there is one. I don't think that this change has any undesirable side effects but I am not as familiar with the new db as I should be.
This commit is contained in:
parent
6eb8213f25
commit
be9828997e
1 changed files with 2 additions and 1 deletions
|
|
@ -1042,7 +1042,8 @@ def set_field(self, name, book_id_to_val_map, allow_case_change=True, do_path_up
|
|||
else:
|
||||
v = sid = None
|
||||
if name.startswith('#') and sid is None:
|
||||
sid = 1.0 # The value will be set to 1.0 in the db table
|
||||
extra = self.field_for(name + '_index', k)
|
||||
sid = extra if extra else 1.0 # The value to be set the db link table
|
||||
bimap[k] = v
|
||||
if sid is not None:
|
||||
simap[k] = sid
|
||||
|
|
|
|||
Loading…
Reference in a new issue