Skip to content
Snippets Groups Projects
Commit fd157a5c authored by Jörn Künsemöller's avatar Jörn Künsemöller
Browse files

TMSS-195: ignore empty default constraint

parent 802cb646
No related branches found
No related tags found
1 merge request!441Resolve TMSS-195
......@@ -295,7 +295,7 @@ def can_run_anywhere_within_timewindow_with_sky_constraints(scheduling_unit: mod
else:
logger.info('min_target_elevation=%s constraint is not met at timestamp=%s' % (min_elevation.rad, timestamps[i]))
return False
if 'transit_offset' in constraints['sky'] and task['specifications_template'] == 'target observation':
if 'transit_offset' in constraints['sky'] and 'from' in constraints['sky']['transit_offset'] and task['specifications_template'] == 'target observation':
# Check constraint on tile beam for HBA only:
if task['specifications_doc']['antenna_set'].startswith('HBA'):
# since the constraint only applies to the middle of the obs, consider its duration
......@@ -323,7 +323,7 @@ def can_run_anywhere_within_timewindow_with_sky_constraints(scheduling_unit: mod
return False
if 'SAPs' in task['specifications_doc']:
if 'transit_offset' in constraints['sky'] and task['specifications_template'] == 'target observation':
if 'transit_offset' in constraints['sky'] and 'from' in constraints['sky']['transit_offset'] and task['specifications_template'] == 'target observation':
# Check constraint on SAPs for LBA only:
if task['specifications_doc']['antenna_set'].startswith('LBA'):
# since the constraint only applies to the middle of the obs, consider its duration
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment