Commit 821ec8dc authored by Ivan Tyagov's avatar Ivan Tyagov

Wendelin datalake fixes

See merge request nexedi/wendelin!73
parents fede1d1d fe11d7fd
......@@ -8,5 +8,5 @@ for data_set in context.portal_catalog(portal_type = "Data Set",
aggregate_uid = data_set.getUid())
for data_ingestion_line in data_ingestion_line_list:
data_stream = data_ingestion_line.getAggregateValue(portal_type = "Data Stream")
if data_stream.getValidationState() == "validated":
if data_stream and data_stream.getValidationState() == "validated":
data_stream.publish()
......@@ -3,4 +3,5 @@
"""
data_set = state_change['object']
for data_stream in data_set.DataSet_getDataStreamList():
data_stream.activate().invalidate()
if data_stream and data_stream.getValidationState() != 'draft':
data_stream.activate().invalidate()
......@@ -3,5 +3,5 @@
"""
data_set = state_change['object']
for data_stream in data_set.DataSet_getDataStreamList():
if data_stream and not context.getPortalObject().ERP5Site_checkReferenceInvalidated(data_stream) and data_stream.getValidationState() != 'draft':
if data_stream and not context.getPortalObject().ERP5Site_checkReferenceInvalidated(data_stream) and data_stream.getValidationState() == 'validated':
data_stream.activate().publish()
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