Commit f6b4fc4a authored by Klaus Wölfel's avatar Klaus Wölfel

data analysis creation: workaround the case that no device configuration portal type exists

without this work around aggregate from any portal type would be returned, because getAggregateValue(portal_type=[]) does not return None as expected. This must be fixed properly in generic erp5
parent 1c608aac
...@@ -55,6 +55,11 @@ for movement in portal_catalog(query): ...@@ -55,6 +55,11 @@ for movement in portal_catalog(query):
aggregate_set = set() aggregate_set = set()
# manually add device and device configuration to every line # manually add device and device configuration to every line
aggregate_set.add(movement.getAggregateDevice()) aggregate_set.add(movement.getAggregateDevice())
# workaround the case that device configuration portal type exists
# without this work around aggregate from any portal type
# would be returned, because getAggregateValue(portal_type=[]) does not
# return None as expected. This must be fixed properly in generic erp5
if portal.getPortalDeviceConfigurationTypeList():
aggregate_set.add(movement.getAggregateDeviceConfiguration()) aggregate_set.add(movement.getAggregateDeviceConfiguration())
if transformation_line.getPortalType() == \ if transformation_line.getPortalType() == \
"Data Transformation Resource Line": "Data Transformation Resource Line":
......
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