Skip to content
Snippets Groups Projects
Commit d9a308d4 authored by Alexander van Amesfoort's avatar Alexander van Amesfoort
Browse files

Task #9939: RA assigner: restore logic to also (check specs and) insert task...

Task #9939: RA assigner: restore logic to also (check specs and) insert task if status is approved. Patch by Adriaan Renting.
parent 620c30fa
No related branches found
No related tags found
No related merge requests found
......@@ -130,7 +130,7 @@ class ResourceAssigner():
otdb_id = specification_tree['otdb_id']
status = specification_tree.get('state', '').lower()
if status != 'prescheduled':
if status not in ['approved', 'prescheduled']: # For approved we only do a few checks and put it in the RADB
logger.warn('skipping specification for task otdb_id=%s, because status=%s (not prescheduled)', otdb_id, status)
return
......@@ -233,6 +233,10 @@ class ResourceAssigner():
taskId = result['task_id']
logger.info('doAssignment: inserted specification (id=%s) and task (id=%s)' % (specificationId, taskId))
if status != 'prescheduled': # should only happen for approved
logger.info('skipping resource assignment for task otdb_id=%s, because status=%s' % (otdb_id, status))
return
task = None
try:
task = self.radbrpc.getTask(taskId)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment