Explorar o código

fix: allow fallback to remote_url when url is not provided (#12455)

Hiroshi Fujita hai 3 meses
pai
achega
4295cefeb1
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      api/factories/file_factory.py

+ 1 - 1
api/factories/file_factory.py

@@ -158,7 +158,7 @@ def _build_from_remote_url(
     tenant_id: str,
     transfer_method: FileTransferMethod,
 ) -> File:
-    url = mapping.get("url")
+    url = mapping.get("url") or mapping.get("remote_url")
     if not url:
         raise ValueError("Invalid file url")