Aug 21 - MT22 logo seam fix

This commit is contained in:
2026-08-21 09:19:42 -04:00
parent 54a4a44bae
commit 6371b13c13
7 changed files with 352 additions and 21 deletions
+14
View File
@@ -183,6 +183,20 @@ def collect_referenced(db_uri):
for rid, photo_path in rows:
add(photo_path, f'inspection_result:{rid}:photo_path',
'inspection_result.photo_path')
# --- TenantSettings: branding logo (MT-22) ---
# The logo was written straight to disk before MT-22, so it was
# never part of this inventory and would have been left behind at
# R2 cutover — a tenant flipping to s3 would lose its logo.
# Tolerant of the table being absent: tenants provisioned before
# MT-7 have no tenant_settings.
try:
rows = conn.execute(text('SELECT id, logo_url FROM tenant_settings'))
for rid, logo_url in rows:
add(logo_url, f'tenant_settings:{rid}:logo_url',
'tenant_settings.logo_url')
except Exception:
pass
finally:
engine.dispose()