diff --git a/django/contrib/localflavor/mx/forms.py b/django/contrib/localflavor/mx/forms.py index 95ca73d9016..deecb4ea41a 100644 --- a/django/contrib/localflavor/mx/forms.py +++ b/django/contrib/localflavor/mx/forms.py @@ -143,7 +143,7 @@ class MXRFCField(RegexField): www.sisi.org.mx/jspsi/documentos/2005/seguimiento/06101/0610100162005_065.doc """ chars = u'0123456789ABCDEFGHIJKLMN&OPQRSTUVWXYZ-Ñ' - if len(rfc) is 11: + if len(rfc) == 11: rfc = '-' + rfc sum_ = sum(i * chars.index(c) for i, c in zip(reversed(xrange(14)), rfc))