Pārlūkot izejas kodu

fix: skip file format check of mime types for generated files by tools (#17455)

tags/1.2.0
Bowen Liang pirms 7 mēnešiem
vecāks
revīzija
fcd5fcca83
Revīzijas autora e-pasta adrese nav piesaistīta nevienam kontam
1 mainītis faili ar 0 papildinājumiem un 2 dzēšanām
  1. 0
    2
      api/factories/file_factory.py

+ 0
- 2
api/factories/file_factory.py Parādīt failu

@@ -253,8 +253,6 @@ def _build_from_tool_file(
extension = "." + tool_file.file_key.split(".")[-1] if "." in tool_file.file_key else ".bin"

file_type = _standardize_file_type(extension=extension, mime_type=tool_file.mimetype)
if file_type.value != mapping.get("type", "custom"):
raise ValueError("Detected file type does not match the specified type. Please verify the file.")

return File(
id=mapping.get("id"),

Notiek ielāde…
Atcelt
Saglabāt