Fix Celery startup and ImageService temp handling
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user