File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -291,14 +291,12 @@ def delete(cls, id_):
291291 SELECT DISTINCT analysis_id
292292 FROM qiita.analysis_sample
293293 WHERE artifact_id IN %s)"""
294- qdb .sql_connection .TRN .add (sql , [aid ])
294+ qdb .sql_connection .TRN .add (sql , [tuple ([ aid ]) ])
295295 analyses = set (
296296 qdb .sql_connection .TRN .execute_fetchflatten ())
297- if analyses :
298- for _id in analyses :
299- ANALYSIS .delete_analysis_artifacts (_id )
300- else :
301- ANALYSIS .delete (aid )
297+ for _id in analyses :
298+ ANALYSIS .delete_analysis_artifacts (_id )
299+ qdb .artifact .Artifact .delete (aid )
302300
303301 # Delete the prep template filepaths
304302 sql = """DELETE FROM qiita.prep_template_filepath
Original file line number Diff line number Diff line change @@ -688,7 +688,7 @@ def test_is_public_make_public(self):
688688 def test_slurm_reservation (self ):
689689 analysis = qdb .analysis .Analysis (1 )
690690 self .assertIsNone (analysis .slurm_reservation )
691- text = 'this is a test !'
691+ text = 'thisisatest !'
692692 analysis .slurm_reservation = text
693693 self .assertEqual (analysis ._slurm_reservation (), [text ])
694694 self .assertIsNone (analysis .slurm_reservation )
You can’t perform that action at this time.
0 commit comments