# Editing a poll with votes creates inconsistent state

**URL:** <https://meta.discourse.org/t/editing-a-poll-with-votes-creates-inconsistent-state/28239>\
**Category:** Bug\
**Tags:** polls\
**Created:** [02.Май.2015 14:31:09 UTC](https://meta.discourse.org/t/editing-a-poll-with-votes-creates-inconsistent-state/28239 "2015-05-02T14:31:09Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![gerhard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gerhard/32/119479_2.png) [@gerhard](https://meta.discourse.org/u/gerhard)\
**Post date:** [02.Май.2015 14:31:09 UTC](https://meta.discourse.org/t/editing-a-poll-with-votes-creates-inconsistent-state/28239/1 "2015-05-02T14:31:09Z")

</div>

**Steps to reproduce**

- Create a new poll
- Vote for an option
- Edit the poll and add another option

**Expected result**  
The poll should show the additional option and the already cast votes should be visible.

**Actual result**  
The additional option is visible and the votes are still there, but the total\_votes are gone which results in invalid results.  
I voted for “Yes” in the following example and then added the “I don’t know” option to it.

_Poll ([view on site](https://meta.discourse.org/t/editing-a-poll-with-votes-creates-inconsistent-state/28239/1))_

* * *

**Bonus bug**  
Same steps as above with the following additional steps:

- Click “Hide results” when the poll is already “destroyed”.
- Vote for another option like “No”.

See the following example for the result of those actions:

_Poll ([view on site](https://meta.discourse.org/t/editing-a-poll-with-votes-creates-inconsistent-state/28239/1))_

---

_[View the full topic](https://meta.discourse.org/t/editing-a-poll-with-votes-creates-inconsistent-state/28239)._
