EditRepository now stores the callback passed to __init__ and calls it during save().

This is for consistency with other types of EditPrimary.
This commit is contained in:
Steve Youngs 2020-01-08 20:42:37 +00:00 committed by Paul Culley
parent 349edca738
commit 2a17f8d99f

View File

@ -65,7 +65,7 @@ class EditRepository(EditPrimary):
EditPrimary.__init__(self, dbstate, uistate, track, repository,
dbstate.db.get_repository_from_handle,
dbstate.db.get_repository_from_gramps_id)
dbstate.db.get_repository_from_gramps_id, callback)
def empty_object(self):
return Repository()
@ -208,6 +208,8 @@ class EditRepository(EditPrimary):
self.db.commit_repository(self.obj, trans)
self._do_close()
if self.callback:
self.callback(self.obj)
class DeleteRepositoryQuery:
def __init__(self, dbstate, uistate, repository, sources):