mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-29 20:16:44 +00:00
Fix thumbnail command (#3243)
- New image size "preview" was not being generated - Check was looking for existance of "thumbnail" (which did exist) - Updated so that all image sizes are generated on a migration
This commit is contained in:
parent
7283197bac
commit
b247aa6062
@ -4,9 +4,7 @@
|
||||
"""
|
||||
|
||||
import logging
|
||||
import os
|
||||
|
||||
from django.conf import settings
|
||||
from django.core.management.base import BaseCommand
|
||||
from django.db.utils import OperationalError, ProgrammingError
|
||||
|
||||
@ -27,10 +25,7 @@ class Command(BaseCommand):
|
||||
return
|
||||
|
||||
img = model.image
|
||||
url = img.thumbnail.name
|
||||
loc = os.path.join(settings.MEDIA_ROOT, url)
|
||||
|
||||
if not os.path.exists(loc):
|
||||
logger.info(f"Generating thumbnail image for '{img}'")
|
||||
|
||||
try:
|
||||
|
Loading…
x
Reference in New Issue
Block a user