diff --git a/registrasion/views.py b/registrasion/views.py index e23b57a1bcb0e3e363208f63740acf8c74627ce2..41c4a0d6676f28b3607fea1f1db54bcb82e48b3b 100644 --- a/registrasion/views.py +++ b/registrasion/views.py @@ -429,7 +429,11 @@ def _handle_products(request, category, products, prefix): ) handled = False if products_form.errors else True - discounts = DiscountController.available_discounts( + # Making this a function to lazily evaluate when it's displayed + # in templates. + + discounts = util.lazy( + DiscountController.available_discounts, request.user, [], products,