From dc8d77bdea5a82b65ef2a0f83e1141b48040219c Mon Sep 17 00:00:00 2001 From: Oliver Date: Fri, 31 May 2024 17:07:12 +1000 Subject: [PATCH] Migration fix (#7379) - Handle missing template file --- .../InvenTree/report/migrations/0023_auto_20240421_0455.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/backend/InvenTree/report/migrations/0023_auto_20240421_0455.py b/src/backend/InvenTree/report/migrations/0023_auto_20240421_0455.py index f33ca0f98a..4326acaa04 100644 --- a/src/backend/InvenTree/report/migrations/0023_auto_20240421_0455.py +++ b/src/backend/InvenTree/report/migrations/0023_auto_20240421_0455.py @@ -40,6 +40,10 @@ def forward(apps, schema_editor): filename = template.template.path + if not os.path.exists(filename): + print(f"Migration error: Template file '{filename}' does not exist") + continue + if '/report/inventree/' in filename: # Do not migrate internal report templates continue