4198: Person view does not remove a row correctly when two people are merged.

This patch improves on the context changes:
 * avoid use of transaction_xx methods
 * force an abort in case of unclean transaction

Backward compatibility is broken to achieve this.


svn: r16680
This commit is contained in:
Benny Malengier
2011-02-20 10:52:06 +00:00
parent cce4013b44
commit 752d594571
47 changed files with 205 additions and 129 deletions

View File

@@ -37,6 +37,7 @@ from gen.ggettext import gettext as _
#-------------------------------------------------------------------------
import Sort
from gen.db import DbTxn
from gui.plug import MenuToolOptions, PluginWindows
from gen.plug.report import utils as ReportUtils
from gen.plug.menu import FilterOption, PersonOption, \
@@ -95,8 +96,7 @@ class SortEvents(PluginWindows.ToolManagedWindowBatch):
self.sort_name = sort_functions[sort_func_num][0]
self.sort_func = sort_functions[sort_func_num][1]
self.sort = Sort.Sort(self.db)
with self.db.transaction_begin(_("Sort event changes"), batch=True
) as trans:
with DbTxn(_("Sort event changes"), self.db, batch=True) as trans:
self.db.disable_signals()
family_handles = self.sort_person_events(trans)
if len(family_handles) > 0: