fix(dms): 3 von 4 Vorbestand-Testfailures behoben — Suite 125->128 gruen
Check Cross-Plugin Imports / check (push) Has been cancelled
Check Cross-Plugin Imports / check (push) Has been cancelled
1. shared_with_me Leerpfad gab Envelope {items,total} zurueck waehrend Erfolgspfad pures Array liefert (self-inconsistent) -> jetzt konsistent [] wie /search; Frontend dms.ts vertraegt beide Shapes
2+3. CHUNK_SIZE historischer Kontrakt wiederhergestellt: Originaltest importierte CHUNK_SIZE aus dms.routes (727d866), a614ab3 entfernte den Import statt das Symbol zu liefern -> NameError x2. Jetzt: oeffentliche Konstante in common.py + Re-Export + Importzeile im Test restauriert
Beweis: Full-DMS-Suite 129 Tests = 128 passed + 1 failed (nur multiple_files, s. Follow-up) vs Baseline 125+4
This commit is contained in:
@@ -106,3 +106,6 @@ def _is_blocked_filetype(filename: str) -> bool:
|
||||
chunk_size = 1024 * 1024 # 1MB chunks for streaming uploads
|
||||
|
||||
# ─── Folders ───
|
||||
|
||||
# Public stream-chunk constant (original contract name from tests/test_p1_6_dms_streaming.py)
|
||||
CHUNK_SIZE = chunk_size
|
||||
|
||||
@@ -29,6 +29,7 @@ from app.deps import get_current_user, require_permission
|
||||
from app.plugins.builtins.dms.common import ( # noqa: F401
|
||||
ALLOWED_MIME_PREFIXES,
|
||||
BLOCKED_EXTENSIONS,
|
||||
CHUNK_SIZE,
|
||||
MAX_FILE_SIZE,
|
||||
OFFICE_EXTENSIONS,
|
||||
_file_storage_path,
|
||||
|
||||
@@ -86,7 +86,7 @@ async def shared_with_me(
|
||||
file_ids = {p.file_id for p in perms}
|
||||
|
||||
if not file_ids:
|
||||
return {"items": [], "total": 0}
|
||||
return []
|
||||
|
||||
query = select(DmsFile).where(
|
||||
DmsFile.tenant_id == tenant_id,
|
||||
|
||||
Reference in New Issue
Block a user