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/05 13:56:12 UTC

[airavata-django-portal] branch master updated: AIRAVATA-3016 Fix checking for 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 0f07dc6  AIRAVATA-3016 Fix checking for input file upload
0f07dc6 is described below

commit 0f07dc6703161cc4b5c87551ae36a82f18d16d45
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Wed Jun 5 09:55:49 2019 -0400

    AIRAVATA-3016 Fix checking for input file upload
---
 django_airavata/apps/api/data_products_helper.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/django_airavata/apps/api/data_products_helper.py b/django_airavata/apps/api/data_products_helper.py
index d7818ba..b8c19ec 100644
--- a/django_airavata/apps/api/data_products_helper.py
+++ b/django_airavata/apps/api/data_products_helper.py
@@ -49,8 +49,8 @@ def copy_input_file_upload(request, data_product):
 
 def is_input_file_upload(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)
+    path = _get_replica_filepath(data_product)
+    if datastore.exists(request.user.username, path):
         rel_path = datastore.rel_path(request.user.username, path)
         return os.path.dirname(rel_path) == TMP_INPUT_FILE_UPLOAD_DIR
     else: