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

@ -50,6 +50,7 @@ log = logging.getLogger('.ImportProGen')
import Utils
from gui.utils import ProgressMeter
import gen.lib
from gen.db import DbTxn
from QuestionDialog import ErrorDialog
class ProgenError(Exception):
@ -495,8 +496,7 @@ class ProgenParser(object):
self.pers = _read_recs(self.def_['Table_1'], self.bname)
self.rels = _read_recs(self.def_['Table_2'], self.bname)
with self.db.transaction_begin(_("Pro-Gen import"), batch=True
) as self.trans:
with DbTxn(_("Pro-Gen import"), self.db, batch=True) as self.trans:
self.db.disable_signals()
self.create_persons()