Fix: Auto-cleanup temp files after photo processing
- Added temp file deletion in Celery task after successful processing - Added temp file cleanup in sync fallback method - Added temp file removal in delete() if processing never completed - Prevents accumulation of orphaned files in media/<entity>/temp/ folders
This commit is contained in:
@@ -193,6 +193,11 @@ class BaseProductEntity(models.Model):
|
||||
"""Физическое удаление из БД (необратимо! только для старых товаров)"""
|
||||
super().delete()
|
||||
|
||||
@property
|
||||
def is_active(self):
|
||||
"""Возвращает True если товар активен"""
|
||||
return self.status == 'active'
|
||||
|
||||
def save(self, *args, **kwargs):
|
||||
"""
|
||||
Автогенерация slug из name если не задан.
|
||||
|
||||
Reference in New Issue
Block a user