mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-20 05:46:34 +00:00
fixes for unit testing
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
# Generated by Django 2.2.10 on 2020-04-04 12:38
|
||||
|
||||
from django.db import migrations
|
||||
from django.db.utils import OperationalError
|
||||
from django.db.utils import OperationalError, ProgrammingError
|
||||
|
||||
from part.models import Part
|
||||
from stdimage.utils import render_variations
|
||||
@ -17,8 +17,9 @@ def create_thumbnails(apps, schema_editor):
|
||||
# Render thumbnail for each existing Part
|
||||
if part.image:
|
||||
part.image.render_variations()
|
||||
except OperationalError:
|
||||
print("Error - could not generate Part thumbnails")
|
||||
except (OperationalError, ProgrammingError):
|
||||
# Migrations have not yet been applied - table does not exist
|
||||
print("Could not generate Part thumbnails")
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
|
Reference in New Issue
Block a user