Readonly databases do not necessarily have commit methods

svn: r15460
This commit is contained in:
Doug Blank 2010-05-23 15:00:48 +00:00
parent 7c4d945da6
commit ed73f393ed

View File

@ -77,6 +77,7 @@ class EditEvent(EditPrimary):
self._init_event()
def _init_event(self):
if not self.db.readonly:
self.commit_event = self.db.commit_event
def empty_object(self):
@ -302,6 +303,7 @@ class EditPersonEvent(EditEvent):
EditEvent.__init__(self, dbstate, uistate, track, event, callback)
def _init_event(self):
if not self.db.readonly:
self.commit_event = self.db.commit_personal_event
def get_custom_events(self):
@ -313,6 +315,7 @@ class EditFamilyEvent(EditEvent):
EditEvent.__init__(self, dbstate, uistate, track, event, callback)
def _init_event(self):
if not self.db.readonly:
self.commit_event = self.db.commit_family_event
def get_custom_events(self):