diff options
Diffstat (limited to 'license_protected_downloads/views.py')
-rw-r--r-- | license_protected_downloads/views.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/license_protected_downloads/views.py b/license_protected_downloads/views.py index f0c5d32..c00ef38 100644 --- a/license_protected_downloads/views.py +++ b/license_protected_downloads/views.py @@ -126,7 +126,8 @@ def group_auth_failed_response(request, auth_groups): def file_server(request, path): """Serve up a file / directory listing or license page as required""" path = iri_to_uri(path) - if "/latest" in path: + s3_prefix = getattr(settings, 'S3_PREFIX_PATH', None) + if "/latest" in path and s3_prefix is not None: new_path = s3_replace_latest(path, None) if new_path != path: |