5109: Error when merging duplicate records

svn: r18012
This commit is contained in:
Michiel Nauta 2011-08-08 21:04:03 +00:00
parent 2176d10611
commit b46a74df36
8 changed files with 24 additions and 16 deletions

View File

@ -185,8 +185,9 @@ class MergeEvents(ManagedWindow.ManagedWindow):
query = MergeEventQuery(self.dbstate, phoenix, titanic)
query.execute()
self.uistate.viewmanager.active_page.selection.unselect_path(
unselect_path)
if self.uistate.viewmanager.active_page.selection:
self.uistate.viewmanager.active_page.selection.unselect_path(
unselect_path)
self.uistate.set_busy_cursor(False)
self.close()

View File

@ -221,8 +221,9 @@ class MergeFamilies(ManagedWindow.ManagedWindow):
query.execute()
except MergeError, err:
ErrorDialog( _("Cannot merge people"), str(err))
self.uistate.viewmanager.active_page.selection.unselect_path(
unselect_path)
if self.uistate.viewmanager.active_page.selection:
self.uistate.viewmanager.active_page.selection.unselect_path(
unselect_path)
self.uistate.set_busy_cursor(False)
self.close()

View File

@ -165,8 +165,9 @@ class MergeMediaObjects(ManagedWindow.ManagedWindow):
query = MergeMediaQuery(self.dbstate, phoenix, titanic)
query.execute()
self.uistate.viewmanager.active_page.selection.unselect_path(
unselect_path)
if self.uistate.viewmanager.active_page.selection:
self.uistate.viewmanager.active_page.selection.unselect_path(
unselect_path)
self.close()
class MergeMediaQuery(object):

View File

@ -175,8 +175,9 @@ class MergeNotes(ManagedWindow.ManagedWindow):
query = MergeNoteQuery(self.dbstate, phoenix, titanic)
query.execute()
self.uistate.viewmanager.active_page.selection.unselect_path(
unselect_path)
if self.uistate.viewmanager.active_page.selection:
self.uistate.viewmanager.active_page.selection.unselect_path(
unselect_path)
self.close()
#-------------------------------------------------------------------------

View File

@ -325,8 +325,9 @@ class MergePeople(ManagedWindow.ManagedWindow):
query.execute()
except MergeError, err:
ErrorDialog( _("Cannot merge people"), str(err))
self.uistate.viewmanager.active_page.selection.unselect_path(
unselect_path)
if self.uistate.viewmanager.active_page.selection:
self.uistate.viewmanager.active_page.selection.unselect_path(
unselect_path)
self.uistate.set_busy_cursor(False)
self.close()
if self.update:

View File

@ -190,8 +190,9 @@ class MergePlaces(ManagedWindow.ManagedWindow):
query = MergePlaceQuery(self.dbstate, phoenix, titanic)
query.execute()
self.uistate.viewmanager.active_page.selection.unselect_path(
unselect_path)
if self.uistate.viewmanager.active_page.selection:
self.uistate.viewmanager.active_page.selection.unselect_path(
unselect_path)
self.uistate.set_busy_cursor(False)
self.close()

View File

@ -151,8 +151,9 @@ class MergeRepositories(ManagedWindow.ManagedWindow):
query = MergeRepoQuery(self.dbstate, phoenix, titanic)
query.execute()
self.uistate.viewmanager.active_page.selection.unselect_path(
unselect_path)
if self.uistate.viewmanager.active_page.selection:
self.uistate.viewmanager.active_page.selection.unselect_path(
unselect_path)
self.uistate.set_busy_cursor(False)
self.close()

View File

@ -178,8 +178,9 @@ class MergeSources(ManagedWindow.ManagedWindow):
query = MergeSourceQuery(self.dbstate, phoenix, titanic)
query.execute()
self.uistate.viewmanager.active_page.selection.unselect_path(
unselect_path)
if self.uistate.viewmanager.active_page.selection:
self.uistate.viewmanager.active_page.selection.unselect_path(
unselect_path)
self.uistate.set_busy_cursor(False)
self.close()