File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -162,10 +162,18 @@ def upsert_predictions_and_send_to_project(
162162 if len (mea_to_mal_data_rows ) == 0 :
163163 return import_job , None , None
164164
165- batch = project .create_batch (name , mea_to_mal_data_rows , priority )
166- mal_prediction_import = Entity .MALPredictionImport .create_for_model_run_data_rows (
167- data_row_ids = mea_to_mal_data_rows , project_id = project_id , ** kwargs )
168- return import_job , batch , mal_prediction_import
165+ try :
166+ batch = project .create_batch (name , mea_to_mal_data_rows , priority )
167+ try :
168+ mal_prediction_import = Entity .MALPredictionImport .create_for_model_run_data_rows (
169+ data_row_ids = mea_to_mal_data_rows ,
170+ project_id = project_id ,
171+ ** kwargs )
172+ return import_job , batch , mal_prediction_import
173+ except :
174+ return import_job , batch , None
175+ except :
176+ return import_job , None , None
169177
170178 def add_predictions (
171179 self ,
You can’t perform that action at this time.
0 commit comments