Skip to content
Snippets Groups Projects
Commit 2be6063b authored by Nathaniel Kofalt's avatar Nathaniel Kofalt
Browse files

Try checking for state

parent bc18f810
No related branches found
No related tags found
No related merge requests found
......@@ -251,6 +251,13 @@ class EnginePlacer(Placer):
def check(self):
self.requireTarget()
# Check that required state exists
if self.context.get('job_id'):
Job.get(self.context.get('job_id'))
if self.context.get('job_ticket_id'):
JobTicket.get(self.context.get('job_ticket_id'))
if self.metadata is not None:
validators.validate_data(self.metadata, 'enginemetadata.json', 'input', 'POST', optional=True)
......@@ -707,6 +714,12 @@ class AnalysisJobPlacer(Placer):
if self.id_ is None:
raise Exception('Must specify a target analysis')
# Check that required state exists
if self.context.get('job_id'):
Job.get(self.context.get('job_id'))
if self.context.get('job_ticket_id'):
JobTicket.get(self.context.get('job_ticket_id'))
def process_file_field(self, field, file_attrs):
if self.metadata is not None:
file_mds = self.metadata.get('acquisition', {}).get('files', [])
......
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