This commit is contained in:
Kovid Goyal 2011-06-01 21:54:23 -06:00
parent cf037a16fc
commit 2010cf2671
2 changed files with 4 additions and 3 deletions

View File

@ -185,5 +185,5 @@ def migrate_old_rule(fm, template):
r.add_condition('tags', 'has', value)
rules.append(r.template)
return rules
return template
return [template]

View File

@ -229,8 +229,9 @@ class LibraryDatabase2(LibraryDatabase, SchemaUpgrade, CustomColumns):
if col and templ:
try:
del self.prefs['column_color_name_'+str(i)]
templ = migrate_old_rule(self.field_metadata, templ)
old_rules.append((col, templ))
rules = migrate_old_rule(self.field_metadata, templ)
for templ in rules:
old_rules.append((col, templ))
except:
pass
if old_rules: