Commit fe11d7fd authored by Roque's avatar Roque

erp5_wendelin_data_lake_ingestion: add state controls on dataset scripts

parent 02986086
......@@ -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