Opened 13 years ago

Closed 13 years ago

Last modified 12 years ago

#734 closed defect (fixed)

isValidIPAddress4 uses wrong ValidationError object

Reported by: hugo Owned by: Adrian Holovaty
Component: Validators Version:
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


The isValidIPAddress4 uses validators.ValidationError instead of just ValidationError and so throws this traceback:

There's been an error:

Traceback (most recent call last):

  File "/usr/local/lib/python2.4/site-packages/django-1.0.0-py2.4.egg/django/core/handlers/", line 71, in get_response
    response = callback(request, **param_dict)

  File "/usr/local/lib/python2.4/site-packages/django-1.0.0-py2.4.egg/django/contrib/admin/views/", line 49, in _checklogin
    return view_func(request, *args, **kwargs)

  File "/usr/local/lib/python2.4/site-packages/django-1.0.0-py2.4.egg/django/contrib/admin/views/", line 878, in change_stage
    errors = manipulator.get_validation_errors(new_data)

  File "/usr/local/lib/python2.4/site-packages/django-1.0.0-py2.4.egg/django/core/", line 70, in get_validation_errors
    validator(new_data.get(field.field_name, ''), new_data)

  File "/usr/local/lib/python2.4/site-packages/django-1.0.0-py2.4.egg/django/core/", line 695, in isValidIPAddress
    validators.isValidIPAddress4(field_data, all_data)

  File "/usr/local/lib/python2.4/site-packages/django-1.0.0-py2.4.egg/django/core/", line 99, in isValidIPAddress4
    raise validators.ValidationError, "Please enter a valid IP address."

NameError: global name 'validators' is not defined

This was reported on IRC by mflanagan.

Change History (1)

comment:1 Changed 13 years ago by Adrian Holovaty

Resolution: fixed
Status: newclosed

(In [1091]) Fixed #734 -- Fixed namespace bug in validators.isValidIPAddress4. Thanks, Hugo and mflanagan

Note: See TracTickets for help on using tickets.
Back to Top