From 3fd586e8a4f1fc5f6e873f9cefcded897832cbef Mon Sep 17 00:00:00 2001 From: Paul Eggleton Date: Tue, 18 Sep 2018 15:20:32 +1200 Subject: [PATCH] import_otherdistro: fix update recording code We were missing some import statements here, so clearly I didn't test this as I thought I had. Signed-off-by: Paul Eggleton --- layerindex/tools/import_otherdistro.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/layerindex/tools/import_otherdistro.py b/layerindex/tools/import_otherdistro.py index bd83438..68f91d2 100755 --- a/layerindex/tools/import_otherdistro.py +++ b/layerindex/tools/import_otherdistro.py @@ -337,6 +337,7 @@ def check_branch_layer(args): def get_update_obj(args): + from layerindex.models import Update updateobj = None if args.update: updateobj = Update.objects.filter(id=int(args.update)) @@ -350,7 +351,7 @@ def get_update_obj(args): def import_pkgspec(args): utils.setup_django() import settings - from layerindex.models import LayerItem, LayerBranch, Recipe, ClassicRecipe, Machine, BBAppend, BBClass + from layerindex.models import LayerItem, LayerBranch, Recipe, ClassicRecipe, Machine, BBAppend, BBClass, ComparisonRecipeUpdate from django.db import transaction ret, layerbranch = check_branch_layer(args)