-
Notifications
You must be signed in to change notification settings - Fork 616
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[models:law] Fixed misused async behavior when voting. Closes #394. #489
Conversation
Still working here, don't merge! |
…ng buttons. Closes #394.
Ready to review & merge. Please comment any issue. |
this.votes.push(vote); | ||
// Add citizen as participant | ||
this.addParticipant(citizen); | ||
this.save(cb); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're missing the if (cb)
here
Done. Check this out now. |
@@ -12,6 +12,7 @@ | |||
|
|||
.proposal-options | |||
.vote-box | |||
div#voting-error.alert.alert-warning.hide #{t('Connection error when voting')}. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jfresco please use i18n keys in the canonical format. In this case I guess proposal-options.error.voting
would do
Also, please add i18n keys for all languages. Google translate will do. |
Conflicts: lib/models/law.js lib/proposal-options/proposal-options.js
@jfresco I updated your code to the view refactor approach. I tried it out and seems to be working just fine, but please double-check with your concurrent/error test dataset so we can be sure I introduced no bug and we can go ahead with the merge. |
[models:law] Fixed misused async behavior when voting. Closes #394.
Note that
unvote
is async, but it was being used in a sync way. This may have caused race conditions and led to this odd behavior.