Defined order of positions in addons form

This commit is contained in:
Raphael Michel
2017-10-27 00:00:22 +02:00
parent fe61e4f3e2
commit 28682c7c33

View File

@@ -188,7 +188,7 @@ class AddOnsStep(CartMixin, AsyncAction, TemplateFlowStep):
item_cache = {}
for cartpos in get_cart(self.request).filter(addon_to__isnull=True).prefetch_related(
'item__addons', 'item__addons__addon_category', 'addons', 'addons__variation',
):
).order_by('pk'):
current_addon_products = {
a.item_id: a.variation_id for a in cartpos.addons.all()
}