🐛(media) fix compatibility with Scaleway Object Storage

Some providers with S3-compatible APIs have slightly different
implementations. In this case, Scaleway didn't accept version_id=""
and has a different version ID scheme. This was tested successfully
and should remain compatible with any other provider.
This commit is contained in:
Sylvain Zimmer
2025-03-20 00:16:00 +01:00
committed by Manuel Raynaud
parent f8203a1766
commit a8529e434a
2 changed files with 8 additions and 4 deletions

View File

@@ -943,7 +943,7 @@ class DocumentViewSet(
@drf.decorators.action(
detail=True,
methods=["get", "delete"],
url_path="versions/(?P<version_id>[0-9a-f-]{36})",
url_path="versions/(?P<version_id>[0-9a-z-]+)",
)
# pylint: disable=unused-argument
def versions_detail(self, request, pk, version_id, *args, **kwargs):