DoSomething / voting-app

☑ Voting app for DoSomething.org campaigns.
MIT License
6 stars 4 forks source link

Submitting Another Vote w/ Same Number Results in Unskinned Error #362

Closed namimody closed 9 years ago

namimody commented 9 years ago

I'm 90% sure I submitted a vote with my cell (860 989 0489, but I can't guarantee because transactionals aren't working) and then if I tried to reenter that number, it results in the image below.

Chrome 41

image

DFurnes commented 9 years ago

Ahh, yeah that's a bug. :bug:

From server logs: screen shot 2015-06-19 at 12 59 04 pm

DFurnes commented 9 years ago

I think the issue is that we're checking that phone value is unique, but not running the setter (which removes spaces, dashes, etc.) before doing so. So it sees that (555) 555-5555 isn't in the database, but then hits a constraint violation when it tries to enter 5555555555.