def get_job_ids(**filter_data):
 query = models.TestView.query_objects(filter_data)
 job_ids = set()
 for test_view in query.values('job_tag').distinct():
  first_tag_component = test_view['job_tag'].split('-')[0]
  try:
   job_id = int(first_tag_component)
   job_ids.add(job_id)
  except ValueError:
   pass
 return list(job_ids)

def get_job_ids ( ** filter_data ) : query = models . TestView . query_objects ( filter_data ) job_ids = set ( ) for test_view in query . values ( 'job_tag' ) . distinct ( ) : first_tag_component = test_view [ 'job_tag' ] . split ( '-' ) [ 0 ] try : job_id = int ( first_tag_component ) job_ids . add ( job_id ) except ValueError : pass return list ( job_ids )
returns afe job ids for all tests matching the filters .