Commit 34aec1ac authored by Eteri's avatar Eteri

start data ingestion only if corresponding data supply is validated

parent 901586ca
......@@ -29,9 +29,13 @@ property_dict["stop_date"] = composed.getExpirationDate()
data_ingestion.edit(**property_dict)
data_supply_validated = True
# create ingestion lines from specialise lines
for supply_line in composed.objectValues(
portal_type = 'Data Supply Line'):
if supply_line.getParentValue().getValidationState() != "validated":
data_supply_validated = False
current_line = data_ingestion.newContent(
portal_type = "Data Ingestion Line",
title = supply_line.getTitle(),
......@@ -46,6 +50,8 @@ for supply_line in composed.objectValues(
# we set quantity=0 for the data product lines
current_line.setQuantity(0)
data_ingestion.start()
# start ingestion only if data supply is validated
if data_supply_validated:
data_ingestion.start()
return data_ingestion
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