Fix Celery startup and ImageService temp handling

This commit is contained in:
2025-12-12 20:23:00 +03:00
parent f320eafc55
commit 6023496a7d
3 changed files with 9 additions and 6 deletions

View File

@@ -73,7 +73,12 @@ class ImageService:
parts = path_str.split('/')
if len(parts) < 3:
return ''
return default_storage.url(path_str)
# Если изображение во временной папке (еще не обработано)
# Возвращаем оригинал, так как других размеров еще нет
if 'temp' in parts:
return default_storage.url(path_str)
# Извлекаем base_path, entity_id, photo_id из пути
base_path = parts[0] # products, kits, categories