Ticket #5809: 5809-UnicodeEncodeError.patch

File 5809-UnicodeEncodeError.patch, 576 bytes (added by Julian Bez, 17 years ago)
  • core/validators.py

     
    435435            val = Decimal(field_data)
    436436        except DecimalException:
    437437            raise ValidationError, _("Please enter a valid decimal number.")
     438        except UnicodeEncodeError:
     439            raise ValidationError, _("Please enter a valid decimal number.")
    438440
    439441        pieces = str(val).lstrip("-").split('.')
    440442        decimals = (len(pieces) == 2) and len(pieces[1]) or 0
Back to Top