You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ma...@apache.org on 2019/06/04 21:10:22 UTC
[airavata-django-portal] branch master updated: AIRAVATA-3016 Fix
determining input file upload
This is an automated email from the ASF dual-hosted git repository.
machristie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git
The following commit(s) were added to refs/heads/master by this push:
new 892b02c AIRAVATA-3016 Fix determining input file upload
892b02c is described below
commit 892b02cf205a154a63b21a5dff5cb9ec4358fbfc
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Tue Jun 4 17:10:11 2019 -0400
AIRAVATA-3016 Fix determining input file upload
---
django_airavata/apps/api/data_products_helper.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/django_airavata/apps/api/data_products_helper.py b/django_airavata/apps/api/data_products_helper.py
index fe0f0b3..9eff6a1 100644
--- a/django_airavata/apps/api/data_products_helper.py
+++ b/django_airavata/apps/api/data_products_helper.py
@@ -47,7 +47,8 @@ def copy_input_file_upload(request, data_product):
def is_input_file_upload(request, data_product):
- if exists(request, data_product):
+ # Check if file is one of user's files and in TMP_INPUT_FILE_UPLOAD_DIR
+ if datastore.exists(request.user.username, data_product):
path = _get_replica_filepath(data_product)
rel_path = datastore.rel_path(request.user.username, path)
return os.path.dirname(rel_path) == TMP_INPUT_FILE_UPLOAD_DIR