Commit dc6f2924 authored by Eteri's avatar Eteri

fixup - start data ingestion only if corresponding data supply is validated

parent 34aec1ac
......@@ -29,13 +29,11 @@ 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(),
......@@ -51,6 +49,11 @@ for supply_line in composed.objectValues(
current_line.setQuantity(0)
# start ingestion only if data supply is validated
data_supply_validated = True
for specialise in specialise_list:
if specialise.getPortalType() == "Data Supply":
if specialise.getValidationState() != "validated":
data_supply_validated = False
if data_supply_validated:
data_ingestion.start()
......
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