You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@airavata.apache.org by GitBox <gi...@apache.org> on 2021/02/03 23:16:15 UTC

[GitHub] [airavata-django-portal] machristie commented on a change in pull request #52: AIRAVATA-3310: Enabling file edit at the experiments

machristie commented on a change in pull request #52:
URL: https://github.com/apache/airavata-django-portal/pull/52#discussion_r569819225



##########
File path: django_airavata/apps/api/serializers.py
##########
@@ -513,6 +515,13 @@ def get_isInputFileUpload(self, data_product):
         request = self.context['request']
         return user_storage.is_input_file(request, data_product)
 
+    def get_path(self, data_product):
+        """Getter for path field."""
+        if len(data_product.replicaLocations) > 0:
+            return re.sub(r'.*/tmp/[^/]*/', "", user_storage._get_replica_filepath(data_product))

Review comment:
       @dinukadesilva those links don't seem to be working any longer, meaning they don't point to the right lines. But I tried removing the `path` field from the DataProductSerializer and I was able to upload an input file and then edit it. So I don't think it is needed any longer. Try removing it and see if it works for you too.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org