mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04: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
@ -1042,7 +1042,8 @@ class Cache(object):
|
|||||||
else:
|
else:
|
||||||
v = sid = None
|
v = sid = None
|
||||||
if name.startswith('#') and sid is 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
|
bimap[k] = v
|
||||||
if sid is not None:
|
if sid is not None:
|
||||||
simap[k] = sid
|
simap[k] = sid
|
||||||
|
Loading…
x
Reference in New Issue
Block a user