diff options
Diffstat (limited to 'bitbake/lib/toaster/toastergui/tables.py')
-rw-r--r-- | bitbake/lib/toaster/toastergui/tables.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/bitbake/lib/toaster/toastergui/tables.py b/bitbake/lib/toaster/toastergui/tables.py index 48829351b4..d80b90254a 100644 --- a/bitbake/lib/toaster/toastergui/tables.py +++ b/bitbake/lib/toaster/toastergui/tables.py | |||
@@ -728,7 +728,8 @@ class SelectPackagesTable(PackagesTable): | |||
728 | self.title = "Add | Remove packages" | 728 | self.title = "Add | Remove packages" |
729 | 729 | ||
730 | def setup_queryset(self, *args, **kwargs): | 730 | def setup_queryset(self, *args, **kwargs): |
731 | cust_recipe = CustomImageRecipe.objects.get(pk=kwargs['recipeid']) | 731 | self.cust_recipe =\ |
732 | CustomImageRecipe.objects.get(pk=kwargs['custrecipeid']) | ||
732 | prj = Project.objects.get(pk = kwargs['pid']) | 733 | prj = Project.objects.get(pk = kwargs['pid']) |
733 | 734 | ||
734 | current_packages = self.cust_recipe.get_all_packages() | 735 | current_packages = self.cust_recipe.get_all_packages() |
@@ -747,13 +748,16 @@ class SelectPackagesTable(PackagesTable): | |||
747 | 748 | ||
748 | self.queryset = self.queryset.order_by('name') | 749 | self.queryset = self.queryset.order_by('name') |
749 | 750 | ||
750 | self.static_context_extra['recipe_id'] = kwargs['recipeid'] | 751 | self.static_context_extra['recipe_id'] = kwargs['custrecipeid'] |
751 | self.static_context_extra['current_packages'] = \ | 752 | self.static_context_extra['current_packages'] = \ |
752 | cust_recipe.packages.values_list('pk', flat=True) | 753 | current_packages.values_list('pk', flat=True) |
753 | 754 | ||
754 | def get_context_data(self, **kwargs): | 755 | def get_context_data(self, **kwargs): |
756 | # to reuse the Super class map the custrecipeid to the recipe_id | ||
757 | kwargs['recipe_id'] = kwargs['custrecipeid'] | ||
755 | context = super(SelectPackagesTable, self).get_context_data(**kwargs) | 758 | context = super(SelectPackagesTable, self).get_context_data(**kwargs) |
756 | custom_recipe = CustomImageRecipe.objects.get(pk=kwargs['recipe_id']) | 759 | custom_recipe = \ |
760 | CustomImageRecipe.objects.get(pk=kwargs['custrecipeid']) | ||
757 | 761 | ||
758 | context['recipe'] = custom_recipe | 762 | context['recipe'] = custom_recipe |
759 | context['approx_pkg_size'] = \ | 763 | context['approx_pkg_size'] = \ |