Closed Bug 933263 Opened 11 years ago Closed 11 years ago

[regression] [traceback] Error in radio poll choice forms rendering

Categories

(Mozilla Reps Graveyard :: reps.mozilla.org, task)

task
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: nemo-yiannis, Unassigned)

Details

(Whiteboard: [kb=1167091] )

Traceback (most recent call last):

  File "/data/www/reps.allizom.org/remo/vendor/lib/python/django/core/handlers/base.py", line 111, in get_response
    response = callback(request, *callback_args, **callback_kwargs)

  File "/data/www/reps.allizom.org/remo/remo/base/decorators.py", line 75, in wrapper
    return func(request, *args, **kwargs)

  File "/data/www/reps.allizom.org/remo/remo/voting/views.py", line 187, in view_voting
    return render(request, 'vote_voting.html', data)

  File "/data/www/reps.allizom.org/remo/vendor/lib/python/django/shortcuts/__init__.py", line 44, in render
    return HttpResponse(loader.render_to_string(*args, **kwargs),

  File "/data/www/reps.allizom.org/remo/vendor/lib/python/django/template/loader.py", line 176, in render_to_string
    return t.render(context_instance)

  File "/data/www/reps.allizom.org/remo/vendor/src/jingo/jingo/__init__.py", line 189, in render
    return super(Template, self).render(context_dict)

  File "/usr/lib/python2.6/site-packages/jinja2/environment.py", line 891, in render
    return self.environment.handle_exception(exc_info, True)

  File "/data/www/reps.allizom.org/remo/remo/voting/templates/vote_voting.html", line 1, in top-level template code
    {% extends "base_fd4.html" %}

  File "/data/www/reps.allizom.org/remo/remo/base/templates/base_fd4.html", line 223, in top-level template code
    {% block content %}

  File "/data/www/reps.allizom.org/remo/remo/voting/templates/vote_voting.html", line 196, in block "content"
    {{ choice }}

  File "/usr/lib/python2.6/site-packages/jinja2/_markupsafe/_native.py", line 20, in escape
    return s.__html__()

  File "/data/www/reps.allizom.org/remo/vendor/src/nuggets/safe_django_forms.py", line 55, in __html__
    return unicode(self)

  File "/data/www/reps.allizom.org/remo/vendor/lib/python/django/forms/forms.py", line 411, in __unicode__
    return self.as_widget()

  File "/data/www/reps.allizom.org/remo/vendor/lib/python/django/forms/forms.py", line 458, in as_widget
    return widget.render(name, self.value(), attrs=attrs)

  File "/data/www/reps.allizom.org/remo/vendor/lib/python/django/forms/widgets.py", line 547, in render
    options = self.render_options(choices, [value])

  File "/data/www/reps.allizom.org/remo/vendor/lib/python/django/forms/widgets.py", line 570, in render_options
    for option_value, option_label in chain(self.choices, choices):

TypeError: 'NoneType' object is not iterable
Group: mozilla-reps-admins
This 500 error is not related only to bugs created using swag/budget automation.
Steps to reproduce:

* Create a future voting with a radio poll and some choices
* Save it
* Change manually the start date from admin to a past date
* Visit the poll page (eg. https://reps.allizom.org/v/debugging-stage-500-error/)
Summary: [stage] [traceback] 500 error on poll created using swag/budget automation → [regression] [traceback] Error in radio poll choice forms rendering
Whiteboard: [kb=1167091]
Commits pushed to master at https://github.com/mozilla/remo

https://github.com/mozilla/remo/commit/1d8566a16439d100ae280a874f817933245e0f7a
[Fix bug 933263] Fix RadioPollChoiceVoteForm initialization.

https://github.com/mozilla/remo/commit/2a2354c271e6524085177a970dfdede5817e516f
Merge pull request #536 from johngian/fix-500-error

[Fix bug 933263] Fix RadioPollChoiceVoteForm initialization.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
OS: Linux → All
Hardware: x86_64 → All
Version: unspecified → 415
Verified on stage. Thnx!
Status: RESOLVED → VERIFIED
Product: Mozilla Reps → Mozilla Reps Graveyard
You need to log in before you can comment on or make changes to this bug.