Skip to content
Snippets Groups Projects
Commit 868b9f10 authored by Nico Vermaas's avatar Nico Vermaas
Browse files

adapted the functionality based on review

parent 4320e3c7
No related branches found
No related tags found
1 merge request!388Sdc 1663 inputs validation
Pipeline #106386 passed
......@@ -88,6 +88,10 @@ def recalculate_size(data):
Operators or ATDB could have removed files from the inputs json blob.
If that has happened, the task.size_to_process needs to be recalculated
"""
if not data:
# tasks without inputs should just return
return None
logger.info(f'recalculate_size')
new_size = sum([e["size"] for e in data])
return new_size
......@@ -116,4 +120,5 @@ def validate_inputs(task):
# --- recalculate sizes ---
size_to_process = recalculate_size(task.inputs)
if size_to_process:
task.size_to_process = size_to_process
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment