b985c285f9a488a8b028772702e84e20324052fd
Smartphone photos often have EXIF orientation metadata (tags 6, 8, 3) that rotates the display but doesn't transform the pixel data. When PDFs/DOCX embedded images without applying this metadata, they appear rotated 90/180/270 degrees. Use ImageOps.exif_transpose(img) before resize/convert in both _compress_image_for_pdf() and _compress_image_for_docx() to read EXIF orientation and transpose the actual pixel data accordingly. This is a standard Pillow function and is a no-op for images without EXIF. Add regression test test_compress_image_for_docx_handles_exif_orientation to verify images with EXIF tag 0x0112 (orientation=6) are transposed. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Frontend + Backend + Database + Deployment
Deploy na serveru
Nakon što je gitea webhook i testirana skripta za automatsko povlačenje promjena iz repozitorija
cd /opt/erp/app
git fetch origin
git reset --hard origin/main ili git pull --ff-only origin main
# rebuild backend + worker + beat + frontend
docker compose -f docker-compose.yml -f docker-compose.prod.yml build backend worker beat frontend
# digni servise s novim image-ima
docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d --force-recreate backend worker beat frontend
# OBAVEZNO migracije (scheduled_date)
docker compose -f docker-compose.yml -f docker-compose.prod.yml exec backend python manage.py migrate
# provjera
curl -i https://api-004.captain.mitteworkspace.cloud/api/health/
Description
Languages
Python
51%
JavaScript
47.1%
TypeScript
0.8%
Astro
0.6%
CSS
0.3%