7910: tool to Edit Database Owner Information crashes

This commit is contained in:
Josip 2015-07-30 12:10:53 +02:00
parent 7b5c692787
commit 5cf54d4300

View File

@ -163,12 +163,12 @@ class OwnerEditor(tool.Tool, ManagedWindow):
def on_menu_activate(self, menuitem): def on_menu_activate(self, menuitem):
"""Copies the owner information from/to the preferences""" """Copies the owner information from/to the preferences"""
if menuitem.name == 'copy_from_preferences_to_db': if menuitem.props.name == 'copy_from_preferences_to_db':
self.owner.set_from(get_researcher()) self.owner.set_from(get_researcher())
for entry in self.entries: for entry in self.entries:
entry.update() entry.update()
elif menuitem.name == 'copy_from_db_to_preferences': elif menuitem.props.name == 'copy_from_db_to_preferences':
for i in range(len(config_keys)): for i in range(len(config_keys)):
config.set(config_keys[i], self.owner.get()[i]) config.set(config_keys[i], self.owner.get()[i])