Commit 91b4277a authored by Xiaowu Zhang's avatar Xiaowu Zhang

PreferenceConfiguratorItem: bt5_obj maybe not existe

parent d3f43ec4
...@@ -109,6 +109,7 @@ class PreferenceConfiguratorItem(ConfiguratorItemMixin, XMLObject): ...@@ -109,6 +109,7 @@ class PreferenceConfiguratorItem(ConfiguratorItemMixin, XMLObject):
preference_dict['preferred_section'] = organisation_path preference_dict['preferred_section'] = organisation_path
preference.edit(**preference_dict) preference.edit(**preference_dict)
bt5_obj = business_configuration.getSpecialiseValue() bt5_obj = business_configuration.getSpecialiseValue()
if bt5_obj:
current_template_preference_list = list(bt5_obj.getTemplatePreferenceList()) current_template_preference_list = list(bt5_obj.getTemplatePreferenceList())
if preference.getId() not in current_template_preference_list: if preference.getId() not in current_template_preference_list:
current_template_preference_list.append(preference.getId()) current_template_preference_list.append(preference.getId())
......
...@@ -104,6 +104,7 @@ class SystemPreferenceConfiguratorItem(ConfiguratorItemMixin, XMLObject): ...@@ -104,6 +104,7 @@ class SystemPreferenceConfiguratorItem(ConfiguratorItemMixin, XMLObject):
preference.edit(**preference_dict) preference.edit(**preference_dict)
business_configuration = self.getBusinessConfigurationValue() business_configuration = self.getBusinessConfigurationValue()
bt5_obj = business_configuration.getSpecialiseValue() bt5_obj = business_configuration.getSpecialiseValue()
if bt5_obj:
current_template_preference_list = list(bt5_obj.getTemplatePreferenceList()) current_template_preference_list = list(bt5_obj.getTemplatePreferenceList())
if preference.getId() not in current_template_preference_list: if preference.getId() not in current_template_preference_list:
current_template_preference_list.append(preference.getId()) current_template_preference_list.append(preference.getId())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment