Submitting an empty search form crashes Arnold

Bug #1304455 reported by Morten Brekkevold
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Network Administration Visualized
Fix Released
Medium
John-Magne Bredal
3.15
Fix Released
Medium
Unassigned
4.0
Fix Released
Medium
Unassigned

Bug Description

In NAV 3.15 and 4.0, when submitting an empty search form in arnold (/arnold/search), the page crashes with a TypeError.

Traceback looks like this under NAV 3.15:

Traceback (most recent call last):

  File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 111, in get_response
    response = callback(request, *callback_args, **callback_kwargs)

  File "/usr/lib/pymodules/python2.7/nav/web/arnold/views.py", line 96, in render_search
    if form.is_valid():

  File "/usr/lib/python2.7/dist-packages/django/forms/forms.py", line 124, in is_valid
    return self.is_bound and not bool(self.errors)

  File "/usr/lib/python2.7/dist-packages/django/forms/forms.py", line 115, in _get_errors
    self.full_clean()

  File "/usr/lib/python2.7/dist-packages/django/forms/forms.py", line 271, in full_clean
    self._clean_form()

  File "/usr/lib/python2.7/dist-packages/django/forms/forms.py", line 299, in _clean_form
    self.cleaned_data = self.clean()

  File "/usr/lib/pymodules/python2.7/nav/web/arnold/forms.py", line 72, in clean
    IP(searchvalue)

  File "/usr/lib/python2.7/dist-packages/IPy.py", line 250, in __init__
    raise TypeError("Unsupported data type: %s" % type(data))

TypeError: Unsupported data type: <type 'NoneType'>

Tags: arnold
Changed in nav:
status: Confirmed → In Progress
Revision history for this message
John-Magne Bredal (john-m-bredal) wrote :
Changed in nav:
status: In Progress → Fix Committed
Changed in nav:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.