Commit ae45e8ac authored by Ivan Tyagov's avatar Ivan Tyagov

Code style + comments.

parent 4acd0517
"""
Create Data Analyses objects based on Data Transformations.
Usually called periodically from respective ERP5 Alarm.
"""
from DateTime import DateTime
from Products.ZSQLCatalog.SQLCatalog import AndQuery, OrQuery, Query
from Products.ERP5Type.Errors import UnsupportedWorkflowMethod
......@@ -36,6 +40,7 @@ for movement in portal_catalog(query = query):
data_supply_list = delivery.getSpecialiseValueList(portal_type="Data Supply")
composed_data_supply = data_supply.asComposedDocument()
# Get applicable transformation
transformation_list = []
for transformation in composed_data_supply.getSpecialiseValueList(portal_type="Data Transformation"):
......@@ -52,9 +57,7 @@ for movement in portal_catalog(query = query):
transformation_list.append(transformation)
for transformation in transformation_list:
is_shared_data_analysis = False
data_analysis_id= "%s-%s-%s" % (today, delivery.getId(), transformation.getId())
# Check if analysis already exists
......@@ -180,7 +183,6 @@ for movement in portal_catalog(query = query):
item_resource_uid=resource.getUid(),
item_source_relative_url=data_analysis.getSource())
if data_analysis.getDestinationProjectValue() is not None:
item_query_dict["item_project_relative_url"] = data_analysis.getDestinationProject()
......
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