diff --git a/registrasion/controllers/discount.py b/registrasion/controllers/discount.py index 79785a64..984fe214 100644 --- a/registrasion/controllers/discount.py +++ b/registrasion/controllers/discount.py @@ -127,12 +127,10 @@ class DiscountController(object): "discount", ) - valid_discounts = conditions.DiscountBase.objects.all() - all_subsets = [] for discounttype in discounttypes: - discounts = discounttype.objects.filter(id__in=valid_discounts) + discounts = discounttype.objects.all() ctrl = ConditionController.for_type(discounttype) discounts = ctrl.pre_filter(discounts, user) all_subsets.append(discounts) diff --git a/registrasion/controllers/flag.py b/registrasion/controllers/flag.py index 29b5be6d..77d6476d 100644 --- a/registrasion/controllers/flag.py +++ b/registrasion/controllers/flag.py @@ -173,12 +173,10 @@ class FlagController(object): types = list(ConditionController._controllers()) flagtypes = [i for i in types if issubclass(i, conditions.FlagBase)] - all_flags = conditions.FlagBase.objects.all() - all_subsets = [] for flagtype in flagtypes: - flags = flagtype.objects.filter(id__in=all_flags) + flags = flagtype.objects.all() ctrl = ConditionController.for_type(flagtype) flags = ctrl.pre_filter(flags, user) all_subsets.append(flags)