fix: render pipeline + multi-tenancy bugs (B-Fix-1 through B-Fix-9)

- Remove worker-thumbnail (no Blender, was competing on thumbnail_rendering)
- Move render_order_line_task to thumbnail_rendering queue (render-worker)
- Restore template_service.py real implementation (fix circular import shim)
- Thread tenant_id through STEP upload, Excel import, product create
- Make system tables (output_types, materials, etc.) tenant_id nullable
- Fix tenants frontend 307-redirect: use trailing slash /tenants/
- Remove Flamenco + Three.js from Admin UI (unsupported)
- Set all output_types render_backend to celery (was flamenco)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-06 19:34:20 +01:00
parent 381f44bc8b
commit ab3f9c734a
14 changed files with 149 additions and 369 deletions
+6
View File
@@ -241,6 +241,7 @@ async def finalize_excel(
included_rows,
source_excel=str(excel_path),
category_key=parsed_dict.get("category_key"),
tenant_id=getattr(user, 'tenant_id', None),
)
# 5. Seed material aliases
@@ -260,6 +261,7 @@ async def finalize_excel(
created_by=user.id,
source_excel=str(excel_path),
notes=body.notes,
tenant_id=getattr(user, 'tenant_id', None),
)
db.add(order)
await db.flush()
@@ -292,6 +294,7 @@ async def finalize_excel(
for c in row.get("components", [])
],
cad_file_id=inherited_cad,
tenant_id=getattr(user, 'tenant_id', None),
)
db.add(item)
@@ -316,6 +319,7 @@ async def finalize_excel(
product_id=uuid.UUID(product_id),
output_type_id=None,
gewuenschte_bildnummer=row.get("gewuenschte_bildnummer"),
tenant_id=getattr(user, 'tenant_id', None),
)
db.add(line)
else:
@@ -325,6 +329,7 @@ async def finalize_excel(
product_id=uuid.UUID(product_id),
output_type_id=type_id,
gewuenschte_bildnummer=row.get("gewuenschte_bildnummer"),
tenant_id=getattr(user, 'tenant_id', None),
)
db.add(line)
@@ -410,6 +415,7 @@ async def upload_step(
file_hash=file_hash,
file_size=len(content),
processing_status=ProcessingStatus.pending,
tenant_id=getattr(user, 'tenant_id', None),
)
db.add(cad_file)
await db.commit()