Commit c53b7afd authored by Boris Kocherov's avatar Boris Kocherov

fix InternetProtocolAddress portal_type for comptability

with dynamic property_sheets
parent ec41c2b8
...@@ -72,8 +72,8 @@ class InternetProtocolAddress(Coordinate): ...@@ -72,8 +72,8 @@ class InternetProtocolAddress(Coordinate):
if result is None: if result is None:
if self.isDetailed(): if self.isDetailed():
tmp_list = [] tmp_list = []
for prop in PropertySheet.InternetProtocolAddress._properties: for prop in self.getPortalObject().portal_property_sheets.InternetProtocolAddress.contentValues():
property_id = prop['id'] property_id = prop.getTitle()
getter_name = 'get%s' % convertToUpperCase(property_id) getter_name = 'get%s' % convertToUpperCase(property_id)
getter_method = getattr(self, getter_name) getter_method = getattr(self, getter_name)
value = getter_method('') value = getter_method('')
...@@ -115,8 +115,8 @@ network_interface:eth0""" ...@@ -115,8 +115,8 @@ network_interface:eth0"""
security.declareProtected(Permissions.AccessContentsInformation, 'isDetailed') security.declareProtected(Permissions.AccessContentsInformation, 'isDetailed')
def isDetailed(self): def isDetailed(self):
for prop in PropertySheet.InternetProtocolAddress._properties: for prop in self.getPortalObject().portal_property_sheets.InternetProtocolAddress.contentValues():
property_id = prop['id'] property_id = prop.getTitle()
tester_name = 'has%s' % convertToUpperCase(property_id) tester_name = 'has%s' % convertToUpperCase(property_id)
tester_method = getattr(self, tester_name) tester_method = getattr(self, tester_name)
value = tester_method() value = tester_method()
......
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