Protections for readonly databases

svn: r15500
This commit is contained in:
Doug Blank 2010-05-29 20:19:22 +00:00
parent 34c7efe804
commit 1b3e2aa09f
2 changed files with 7 additions and 5 deletions

View File

@ -82,6 +82,7 @@ class EditEventRef(EditReference):
_('_General'), tblref)
def _init_event(self):
if not self.db.readonly:
self.commit_event = self.db.commit_personal_event
self.add_event = self.db.add_person_event
@ -257,6 +258,7 @@ class EditFamilyEventRef(EditEventRef):
event_ref, update)
def _init_event(self):
if not self.db.readonly:
self.commit_event = self.db.commit_family_event
self.add_event = self.db.add_family_event

View File

@ -214,7 +214,7 @@ class EditName(EditSecondary):
self.obj.set_surname,
self.obj.get_surname,
self.db.readonly,
autolist=self.db.get_surname_list(),
autolist=self.db.get_surname_list() if not self.db.readonly else [],
changed=self.update_group_as)
self.prefix_field = MonitoredEntry(