summaryrefslogtreecommitdiff
path: root/postgresqleu/confreg/admin.py
diff options
context:
space:
mode:
Diffstat (limited to 'postgresqleu/confreg/admin.py')
-rw-r--r--postgresqleu/confreg/admin.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/postgresqleu/confreg/admin.py b/postgresqleu/confreg/admin.py
index 4d02116b..e91084e7 100644
--- a/postgresqleu/confreg/admin.py
+++ b/postgresqleu/confreg/admin.py
@@ -558,11 +558,11 @@ class DiscountCodeAdminForm(SelectableWidgetAdminFormMixin, ConcurrentProtectedM
def clean(self):
cleaned_data = super(DiscountCodeAdminForm, self).clean()
- if cleaned_data.has_key('discountamount') and cleaned_data.has_key('discountpercentage'):
+ if 'discountamount' in cleaned_data and 'discountpercentage' in cleaned_data:
if cleaned_data['discountamount'] > 0 and cleaned_data['discountpercentage'] > 0:
raise ValidationError('Cannot specify both discount amount and discount percentage at the same time!')
- if cleaned_data.has_key('discountamount') and cleaned_data.has_key('regonly'):
+ if 'discountamount' in cleaned_data and 'regonly' in cleaned_data:
if cleaned_data['discountamount'] > 0 and cleaned_data['regonly']:
raise ValidationError('Regonly field can only be set for percentage discounts!')