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:
Charles Haley 2015-11-25 12:23:50 +01:00
parent 6eb8213f25
commit be9828997e

View File

@ -1042,7 +1042,8 @@ class Cache(object):
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