* src/GrampsDb/_GrampsDbBase.py: Move _update_reference_map into

_commite_base.
* src/GrampsDb/_GrampsBSDDB.py: Move _update_reference_map into
_commite_base.


svn: r5811
This commit is contained in:
Alex Roitman
2006-01-20 21:52:26 +00:00
parent 77a4023f9e
commit ec6af75b7d
3 changed files with 25 additions and 30 deletions

View File

@@ -368,6 +368,8 @@ class GrampsDbBase(GrampsDBCallback):
obj.change = int(time.time())
handle = str(obj.handle)
self._update_reference_map(obj,transaction)
if transaction.batch:
data_map[handle] = obj.serialize()
old_data = None
@@ -387,8 +389,6 @@ class GrampsDbBase(GrampsDBCallback):
as part of the transaction.
"""
self._update_reference_map(person,transaction)
old_data = self._commit_base(
person, self.person_map, PERSON_KEY, transaction.person_update,
transaction.person_add, transaction, change_time)
@@ -412,8 +412,6 @@ class GrampsDbBase(GrampsDBCallback):
as part of the transaction.
"""
self._update_reference_map(obj,transaction)
self._commit_base(obj, self.media_map, MEDIA_KEY,
transaction.media_update, transaction.media_add,
transaction, change_time)
@@ -424,8 +422,6 @@ class GrampsDbBase(GrampsDBCallback):
as part of the transaction.
"""
self._update_reference_map(source,transaction)
self._commit_base(source, self.source_map, SOURCE_KEY,
transaction.source_update, transaction.source_add,
transaction, change_time)
@@ -436,8 +432,6 @@ class GrampsDbBase(GrampsDBCallback):
as part of the transaction.
"""
self._update_reference_map(place,transaction)
self._commit_base(place, self.place_map, PLACE_KEY,
transaction.place_update, transaction.place_add,
transaction, change_time)
@@ -458,8 +452,6 @@ class GrampsDbBase(GrampsDBCallback):
as part of the transaction.
"""
self._update_reference_map(event,transaction)
self._commit_base(event, self.event_map, EVENT_KEY,
transaction.event_update, transaction.event_add,
transaction, change_time)
@@ -470,8 +462,6 @@ class GrampsDbBase(GrampsDBCallback):
as part of the transaction.
"""
self._update_reference_map(family,transaction)
self._commit_base(family, self.family_map, FAMILY_KEY,
transaction.family_update, transaction.family_add,
transaction, change_time)
@@ -485,8 +475,6 @@ class GrampsDbBase(GrampsDBCallback):
as part of the transaction.
"""
self._update_reference_map(repository,transaction)
self._commit_base(repository, self.repository_map, REPOSITORY_KEY,
transaction.repository_update, transaction.repository_add,
transaction, change_time)