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-sdk.git
commit 33428c1718d10b090387e530cadb9d0f8555d204 Author: Marcus Christie <[email protected]> AuthorDate: Thu Jul 29 16:08:34 2021 -0400 AIRAVATA-3485 Fix looking up/creating data products for experiment files owned by experiment owner --- airavata_django_portal_sdk/user_storage/api.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/airavata_django_portal_sdk/user_storage/api.py b/airavata_django_portal_sdk/user_storage/api.py index c9194f2..74c8525 100644 --- a/airavata_django_portal_sdk/user_storage/api.py +++ b/airavata_django_portal_sdk/user_storage/api.py @@ -318,7 +318,8 @@ def user_file_exists(request, path, storage_resource_id=None, experiment_id=None if backend.is_file(final_path): _, files = backend.get_metadata(final_path) full_path = files[0]['resource_path'] - data_product_uri = _get_data_product_uri(request, full_path, backend.resource_id) + data_product_uri = _get_data_product_uri(request, full_path, + backend.resource_id, owner=owner_username) return data_product_uri else: return None @@ -415,7 +416,8 @@ def get_file_metadata(request, path, storage_resource_id=None, experiment_id=Non _, files = backend.get_metadata(final_path) file = files[0] data_product_uri = _get_data_product_uri(request, file['resource_path'], - storage_resource_id=backend.resource_id) + storage_resource_id=backend.resource_id, + owner=owner_username) data_product = request.airavata_client.getDataProduct( request.authz_token, data_product_uri) @@ -546,6 +548,7 @@ def listdir(request, path, storage_resource_id=None, experiment_id=None): for file in files: data_product_uri = _get_data_product_uri(request, file['resource_path'], storage_resource_id=backend.resource_id, + owner=owner_username, backend=backend) data_product = request.airavata_client.getDataProduct(
