Skip to content

Commit

Permalink
Import S3 connector only when required
Browse files Browse the repository at this point in the history
  • Loading branch information
dblenkus committed Jul 22, 2024
1 parent 4dbece2 commit f86e90c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion resolwe/storage/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
from resolwe.permissions.utils import get_user
from resolwe.storage.connectors import connectors
from resolwe.storage.connectors.baseconnector import BaseStorageConnector
from resolwe.storage.connectors.s3connector import AwsS3Connector
from resolwe.storage.models import FileStorage, ReferencedPath
from resolwe.test.utils import ignore_in_tests

Expand Down Expand Up @@ -61,6 +60,8 @@ class UploadCredentials(APIView):

def get(self, request, *args, **kwargs):
"""Return the upload credentials."""
from resolwe.storage.connectors.s3connector import AwsS3Connector

try:
s3_upload_connector = connectors.for_storage("upload")[0]
except Exception:
Expand Down

0 comments on commit f86e90c

Please sign in to comment.