Skip to content

[DO NOT MERGE] August 24th Release #2249

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 28 commits into from
Aug 23, 2017
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
79b232f
fix #2229
antgonza Aug 16, 2017
2d48a65
cleaning html
antgonza Aug 16, 2017
ee0deb4
fix #2225 and partial #2224
antgonza Aug 16, 2017
4dc760b
fix errors
antgonza Aug 16, 2017
868a9e0
fix #2224 and fix #2223
antgonza Aug 17, 2017
e5ff2c8
fixing comments/errors
antgonza Aug 17, 2017
24b7d8e
Remove race condition - Fixes 2143 (#2203)
josenavas Aug 17, 2017
51ff4f9
fixing error
antgonza Aug 17, 2017
adf98a3
fix #2216
antgonza Aug 17, 2017
4af4656
Merge pull request #2243 from antgonza/fix-2216
adswafford Aug 17, 2017
a450aeb
Merge pull request #2242 from antgonza/fix-2225
adswafford Aug 18, 2017
db0a4b6
Merge pull request #2241 from antgonza/fix-2229
adswafford Aug 18, 2017
899268a
delete-root-analysis-artifact
antgonza Aug 18, 2017
3e17876
fix errors
antgonza Aug 18, 2017
a369cad
Merge pull request #2244 from antgonza/delete-root-analysis-artifact
josenavas Aug 18, 2017
773c8da
fix #2210
antgonza Aug 20, 2017
4bf4e97
fix error
antgonza Aug 20, 2017
a5836b1
fixing test
antgonza Aug 21, 2017
c925756
fix errors
antgonza Aug 21, 2017
19b4fe3
fixes 1880
josenavas Aug 21, 2017
d1bbe46
Removing commented code
josenavas Aug 21, 2017
63ccfd9
Fixing test
josenavas Aug 21, 2017
acd27f5
fix #2211 (#2240)
antgonza Aug 21, 2017
eae20cc
DEBUG: adding prints to see the actual error
josenavas Aug 21, 2017
b7e2cc9
Fixing test and remove debug code
josenavas Aug 21, 2017
39b2b84
Merge pull request #2247 from josenavas/fix-1880
tanaes Aug 21, 2017
f94af55
Merge pull request #2246 from antgonza/fix-2210
tanaes Aug 21, 2017
7941067
Merge pull request #2248 from biocore/dev
josenavas Aug 21, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions qiita_db/artifact.py
Original file line number Diff line number Diff line change
Expand Up @@ -573,11 +573,12 @@ def delete(cls, artifact_id):
WHERE artifact_id = %s"""
qdb.sql_connection.TRN.add(sql, [artifact_id])

# If the artifact doesn't have parents, we move the files to the
# uploads folder. We also need to nullify the column in the prep
# template table
if not instance.parents:
qdb.util.move_filepaths_to_upload_folder(study.id, filepaths)
# If the artifact doesn't have parents and study is not None (is an
# analysis), we move the files to the uploads folder. We also need
# to nullify the column in the prep template table
if not instance.parents and study is not None:
qdb.util.move_filepaths_to_upload_folder(
study.id, filepaths)

sql = """UPDATE qiita.prep_template
SET artifact_id = NULL
Expand Down
3 changes: 3 additions & 0 deletions qiita_db/test/test_artifact.py
Original file line number Diff line number Diff line change
Expand Up @@ -721,6 +721,9 @@ def test_create_root_analysis(self):
self.assertIsNone(obs.study)
self.assertEqual(obs.analysis, qdb.analysis.Analysis(1))

# testing that it can be deleted
qdb.artifact.Artifact.delete(obs.id)

def test_create_processed(self):
exp_params = qdb.software.Parameters.from_default_params(
qdb.software.DefaultParameters(1), {'input_data': 1})
Expand Down