changement vers google drive storage pour les contrats.
CI - Security, Lint & Tests / validate (push) Failing after 1m15s
CI - Security, Lint & Tests / validate (push) Failing after 1m15s
Tentative d'obtenir un token de connection échoue
This commit is contained in:
+7
-1
@@ -34,8 +34,14 @@ import os
|
||||
|
||||
from app.google_drive import (
|
||||
GoogleDriveStorageError,
|
||||
)
|
||||
from app.google_drive import (
|
||||
delete_file as delete_google_drive_file,
|
||||
)
|
||||
from app.google_drive import (
|
||||
download_file as download_google_drive_file,
|
||||
)
|
||||
from app.google_drive import (
|
||||
upload_file as upload_google_drive_file,
|
||||
)
|
||||
|
||||
@@ -112,7 +118,7 @@ def _rooted(env_name, default_name):
|
||||
|
||||
def document_storage_backend():
|
||||
"""Return the configured backend for new document uploads."""
|
||||
backend = os.getenv(DOCUMENT_STORAGE_BACKEND_ENV, 'google_drive').strip().lower()
|
||||
backend = os.getenv(DOCUMENT_STORAGE_BACKEND_ENV, 'local').strip().lower()
|
||||
if backend not in {'google_drive', 'local'}:
|
||||
raise ValueError(
|
||||
f'{DOCUMENT_STORAGE_BACKEND_ENV} must be "google_drive" or "local", not {backend!r}'
|
||||
|
||||
Reference in New Issue
Block a user