Commit 67463024 authored by Klaus Wölfel's avatar Klaus Wölfel

ingestion: except wrong format and log

parent 25f8a69b
......@@ -121,13 +121,21 @@ for line in data_ingestion.objectValues(portal_type="Data Ingestion Line"):
elif line.getResourceValue().getPortalType() == "Data Operation":
operation_line = line
if modify and input_line.getQuantity() == 0:
try:
if modify and input_line.getQuantity() == 0:
init_input_line(input_line, operation_line)
except UnboundLocalError:
if resource_reference == 'GENERIC-INTERVAL-RAW-ARRAY':
context.log("Ignore data with wrong reference {}".format(context.REQUEST.reference))
return portal.data_operation_module.wendelin_ignore_failed, {}
data_operation = operation_line.getResourceValue()
parameter_dict = {
try:
parameter_dict = {
input_line.getReference(): \
{v.getPortalType(): v for v in input_line.getAggregateValueList()}}
except UnboundLocalError:
raise UnboundLocalError("local variable 'input_line' referenced before assignment. reference=%s" %reference)
bucket_reference = movement_dict.get('bucket_reference', None)
if bucket_reference is not None:
parameter_dict['bucket_reference'] = bucket_reference
......
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