Commit a45e6822 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

do not append non-existing information for is_bt_for_diff case, otherwise we...

do not append non-existing information for is_bt_for_diff case, otherwise we cannot notice missing information (like 'Allowed Content Types' etc.) in the 'reinstall' dialog.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@38899 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 2eef43cf
......@@ -2173,15 +2173,16 @@ class PortalTypeAllowedContentTypeTemplateItem(BaseTemplateItem):
if ob is None:
raise ValueError, "Portal Type %s not found in site" %(portal_type,)
prop_value = getattr(ob, self.class_property, ())
if not allowed_type in prop_value and not self.is_bt_for_diff:
if allowed_type in prop_value:
if self.class_property not in portal_type:
key = '%s/%s' % (self.class_property, portal_type)
else:
key = portal_type
self._objects.setdefault(key, []).append(allowed_type)
elif not self.is_bt_for_diff:
raise ValueError, "%s %s not found in portal type %s" % (
getattr(self, 'name', self.__class__.__name__),
allowed_type, portal_type)
if self.class_property not in portal_type:
key = '%s/%s' % (self.class_property, portal_type)
else:
key = portal_type
self._objects.setdefault(key, []).append(allowed_type)
# Function to generate XML Code Manually
def generateXml(self, path=None):
......
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