Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
-
Easy
Description
The Airavata User Portal SDK looks up a configured UserStorageProvider for a Data Product's Storage Resource. When it can't find a UserStorageProvider, an exception is raised, but it's not very helpful:
API exception Traceback (most recent call la st): File "/var/www/portals/django-iu-geology-survey/venv/lib64/python3.6/site-packages/rest_framework/views.py", line 506, in dispatch response = handler(request, *args, **kwargs) File "/va r/www/portals/django-iu-geology-survey/airavata-django-portal/django_airavata/apps/api/views.py", line 819, in get return Response(serializer.data) File "/var/www/portals/django-iu-geology-surve y/venv/lib64/python3.6/site-packages/rest_framework/serializers.py", line 548, in data ret = super().data File "/var/www/portals/django-iu-geology-survey/venv/lib64/python3.6/site-packages/rest_ framework/serializers.py", line 246, in data self._data = self.to_representation(self.instance) File "/var/www/portals/django-iu-geology-survey/venv/lib64/python3.6/site-packages/rest_framework/ serializers.py", line 515, in to_representation ret[field.field_name] = field.to_representation(attribute) File "/var/www/portals/django-iu-geology-survey/venv/lib64/python3.6/site-packages/rest _framework/fields.py", line 1882, in to_representation return method(value) File "/var/www/portals/django-iu-geology-survey/airavata-django-portal/django_airavata/apps/api/serializers.py", line 543, in get_downloadURL if user_storage.exists(request, data_product): File "/var/www/portals/django-iu-geology-survey/venv/lib64/python3.6/site-packages/airavata_django_portal_sdk/user_storage/ api.py", line 283, in exists storage_resource_id=storage_resource_id) File "/var/www/portals/django-iu-geology-survey/venv/lib64/python3.6/site-packages/airavata_django_portal_sdk/user_storage/a pi.py", line 65, in get_user_storage_provider module_name, class_name = module_class_name.rsplit(".", 1) AttributeError: 'NoneType' object has no attribute 'rsplit'
Attachments
Issue Links
- is duplicated by
-
AIRAVATA-3623 airavata-django-portal-sdk: handle case that storage_resource_id isn't configured in USER_STORAGES
- Resolved