[regression] Cannot add radio-poll in already saved voting without one.

VERIFIED FIXED

Status

Mozilla Reps
reps.mozilla.org
VERIFIED FIXED
4 years ago
4 years ago

People

(Reporter: giorgos, Assigned: nemo)

Tracking

Details

(Whiteboard: [kb=1060751] )

(Reporter)

Description

4 years ago
Steps to reproduce:
1. Create a voting with a range vote
2. Click to edit just created voting
3. Click the 'Add radio-poll' button, nothing happens
4. Try to submit, get 500.

The same holds for poll with radio-polls and without range votes.
(Reporter)

Comment 1

4 years ago
Traceback of step (4):

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 76, in wrapper
    return func(request, *args, **kwargs)

  File "/data/www/reps.allizom.org/remo/remo/voting/views.py", line 76, in edit_voting
    instance=poll)

  File "/data/www/reps.allizom.org/remo/remo/voting/forms.py", line 333, in __init__
    super(BaseRadioPollInlineFormSet, self).__init__(*args, **kwargs)

  File "/data/www/reps.allizom.org/remo/vendor/lib/python/django/forms/models.py", line 697, in __init__
    queryset=qs, **kwargs)

  File "/data/www/reps.allizom.org/remo/vendor/lib/python/django/forms/models.py", line 424, in __init__
    super(BaseModelFormSet, self).__init__(**defaults)

  File "/data/www/reps.allizom.org/remo/vendor/lib/python/django/forms/formsets.py", line 53, in __init__
    self._construct_forms()

  File "/data/www/reps.allizom.org/remo/vendor/lib/python/django/forms/formsets.py", line 118, in _construct_forms
    self.forms.append(self._construct_form(i))

  File "/data/www/reps.allizom.org/remo/vendor/lib/python/django/forms/models.py", line 706, in _construct_form
    form = super(BaseInlineFormSet, self)._construct_form(i, **kwargs)

  File "/data/www/reps.allizom.org/remo/vendor/lib/python/django/forms/models.py", line 458, in _construct_form
    return super(BaseModelFormSet, self)._construct_form(i, **kwargs)

  File "/data/www/reps.allizom.org/remo/vendor/lib/python/django/forms/formsets.py", line 138, in _construct_form
    self.add_fields(form, i)

  File "/data/www/reps.allizom.org/remo/remo/voting/forms.py", line 350, in add_fields
    prefix='%s_radio_choices' % pk_value)]

  File "/data/www/reps.allizom.org/remo/remo/voting/forms.py", line 299, in __init__
    .__init__(*args, **kwargs))

  File "/data/www/reps.allizom.org/remo/vendor/lib/python/django/forms/models.py", line 697, in __init__
    queryset=qs, **kwargs)

  File "/data/www/reps.allizom.org/remo/vendor/lib/python/django/forms/models.py", line 424, in __init__
    super(BaseModelFormSet, self).__init__(**defaults)

  File "/data/www/reps.allizom.org/remo/vendor/lib/python/django/forms/formsets.py", line 53, in __init__
    self._construct_forms()

  File "/data/www/reps.allizom.org/remo/vendor/lib/python/django/forms/formsets.py", line 117, in _construct_forms
    for i in xrange(min(self.total_form_count(), self.absolute_max)):

  File "/data/www/reps.allizom.org/remo/vendor/lib/python/django/forms/formsets.py", line 91, in total_form_count
    return self.management_form.cleaned_data[TOTAL_FORM_COUNT]

  File "/data/www/reps.allizom.org/remo/vendor/lib/python/django/forms/formsets.py", line 78, in _management_form
    raise ValidationError('ManagementForm data is missing or has been tampered with')

ValidationError: [u'ManagementForm data is missing or has been tampered with']
(Reporter)

Updated

4 years ago
Whiteboard: [kb=1060751]
(Assignee)

Updated

4 years ago
Assignee: nobody → jgiannelos
OS: Linux → All
Hardware: x86_64 → All

Comment 2

4 years ago
Commits pushed to master at https://github.com/mozilla/remo

https://github.com/mozilla/remo/commit/1a8ae2e7dae5926366ec1de7dd4a44f6299db294
[Fix bug 899090] Add extra range/radio polls when no initial available.

https://github.com/mozilla/remo/commit/14966b6fe9329b960fc4d3d8afb49a67f30c1a62
Merge pull request #641 from johngian/899090-add-poll-without-existing

[Fix bug 899090] Add extra range/radio polls when no initial available.

Updated

4 years ago
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED

Updated

4 years ago
Version: unspecified → next
(Reporter)

Comment 3

4 years ago
Verified fixed on stage. https://reps.allizom.org/v/sdfsdfsdfsdf/edit/

Thanks!
Status: RESOLVED → VERIFIED
(Reporter)

Updated

4 years ago
Version: next → 425
You need to log in before you can comment on or make changes to this bug.