machristie commented on a change in pull request #52:
URL:
https://github.com/apache/airavata-django-portal/pull/52#discussion_r536174951
##########
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/[^/]*/', "",
data_product.replicaLocations[0].filePath)
Review comment:
@dinukadesilva I've added an update_data_product_content function to the
user_storage.py module -
https://github.com/apache/airavata-django-portal-sdk/blob/master/airavata_django_portal_sdk/user_storage.py#L268.
To use the latest sdk, you'll need to clone it and then install it into your
airavata-django-portal virtual environment
```
# activate your airavata-django-portal venv
cd airavata-django-portal
source venv/bin/activate
cd ..
# clone and install SDK into portal venv
git clone https://github.com/apache/airavata-django-portal-sdk.git
cd airavata-django-portal-sdk
python setup.py develop
```
----------------------------------------------------------------
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:
[email protected]