Protections for readonly databases
svn: r15500
This commit is contained in:
parent
34c7efe804
commit
1b3e2aa09f
@ -82,6 +82,7 @@ class EditEventRef(EditReference):
|
|||||||
_('_General'), tblref)
|
_('_General'), tblref)
|
||||||
|
|
||||||
def _init_event(self):
|
def _init_event(self):
|
||||||
|
if not self.db.readonly:
|
||||||
self.commit_event = self.db.commit_personal_event
|
self.commit_event = self.db.commit_personal_event
|
||||||
self.add_event = self.db.add_person_event
|
self.add_event = self.db.add_person_event
|
||||||
|
|
||||||
@ -257,6 +258,7 @@ class EditFamilyEventRef(EditEventRef):
|
|||||||
event_ref, update)
|
event_ref, update)
|
||||||
|
|
||||||
def _init_event(self):
|
def _init_event(self):
|
||||||
|
if not self.db.readonly:
|
||||||
self.commit_event = self.db.commit_family_event
|
self.commit_event = self.db.commit_family_event
|
||||||
self.add_event = self.db.add_family_event
|
self.add_event = self.db.add_family_event
|
||||||
|
|
||||||
|
@ -214,7 +214,7 @@ class EditName(EditSecondary):
|
|||||||
self.obj.set_surname,
|
self.obj.set_surname,
|
||||||
self.obj.get_surname,
|
self.obj.get_surname,
|
||||||
self.db.readonly,
|
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)
|
changed=self.update_group_as)
|
||||||
|
|
||||||
self.prefix_field = MonitoredEntry(
|
self.prefix_field = MonitoredEntry(
|
||||||
|
Loading…
Reference in New Issue
Block a user