Skip to content

Commit

Permalink
Merge pull request #2151 from antgonza/fix-delete-sample
Browse files Browse the repository at this point in the history
fixing error in sample delete
  • Loading branch information
josenavas committed Jun 21, 2017
2 parents 9bb1fd5 + 2626da1 commit 02bff6c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion qiita_pet/handlers/api_proxy/sample_template.py
Expand Up @@ -521,7 +521,9 @@ def sample_template_patch_request(user_id, req_op, req_path, req_value=None,
if req_op == 'remove':
req_path = [v for v in req_path.split('/') if v]

# format: study_id/row_id/column|sample/attribute_id
# format
# column: study_id/row_id/columns/column_name
# sample: study_id/row_id/samples/sample_id
if len(req_path) != 4:
return {'status': 'error',
'message': 'Incorrect path parameter'}
Expand Down
2 changes: 1 addition & 1 deletion qiita_pet/templates/study_ajax/sample_prep_summary.html
Expand Up @@ -65,7 +65,7 @@
$.ajax({
url: '{% raw qiita_config.portal_dir %}/study/description/sample_template/',
type: 'PATCH',
data: {'op': 'remove', 'path': '/{{study_id}}/samples/' + sample_name},
data: {'op': 'remove', 'path': '/{{study_id}}/' + row_id + '/samples/' + column_name},
success: function(data) {
if(data.status == 'error') {
bootstrapAlert(data.message, "danger");
Expand Down

0 comments on commit 02bff6c

Please sign in to comment.