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 2021/06/25 19:59:40 UTC
[airavata-django-portal] 07/10: AIRAVATA-3420 Remove check for
get_lazy_download_url
This is an automated email from the ASF dual-hosted git repository.
machristie pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git
commit b1e7f039d1cd0cd0b0cb229692bf202929e0decd
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Thu Jun 24 15:25:04 2021 -0400
AIRAVATA-3420 Remove check for get_lazy_download_url
---
django_airavata/apps/api/serializers.py | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/django_airavata/apps/api/serializers.py b/django_airavata/apps/api/serializers.py
index 754e70d..6eb8c7f 100644
--- a/django_airavata/apps/api/serializers.py
+++ b/django_airavata/apps/api/serializers.py
@@ -468,9 +468,7 @@ class DataProductSerializer(
def get_downloadURL(self, data_product):
"""Getter for downloadURL field."""
request = self.context['request']
- if hasattr(user_storage, 'get_lazy_download_url'):
- return user_storage.get_lazy_download_url(request, data_product)
- return None
+ return user_storage.get_lazy_download_url(request, data_product)
def get_isInputFileUpload(self, data_product):
"""Return True if this is an uploaded input file."""
@@ -861,8 +859,7 @@ class UserStorageFileSerializer(serializers.Serializer):
def get_downloadURL(self, file):
"""Getter for downloadURL field."""
request = self.context['request']
- if hasattr(user_storage, 'get_lazy_download_url'):
- return user_storage.get_lazy_download_url(request, data_product_uri=file['data-product-uri'])
+ return user_storage.get_lazy_download_url(request, data_product_uri=file['data-product-uri'])
class UserStorageDirectorySerializer(serializers.Serializer):