summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--django/contrib/localflavor/no/forms.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/django/contrib/localflavor/no/forms.py b/django/contrib/localflavor/no/forms.py
index a0d599324f..2de3df14d8 100644
--- a/django/contrib/localflavor/no/forms.py
+++ b/django/contrib/localflavor/no/forms.py
@@ -1,4 +1,3 @@
-# -*- coding: iso-8859-1 -*-
"""
Norwegian-specific Form helpers
"""
@@ -66,7 +65,7 @@ class NOSocialSecurityNumber(Field):
weight_2 = [5, 4, 3, 2, 7, 6, 5, 4, 3, 2, 1]
def multiply_reduce(aval, bval):
- return sum((a * b) for (a, b) in zip(aval, bval))
+ return sum([(a * b) for (a, b) in zip(aval, bval)])
if multiply_reduce(digits, weight_1) % 11 != 0:
raise ValidationError(msg)