Skip to content

Commit

Permalink
Fix the cancellation process of the questionnaire
Browse files Browse the repository at this point in the history
  • Loading branch information
Osamu-Sawada committed Apr 12, 2019
1 parent d466963 commit 77ab8d5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions contracts/CryptoVote.sol
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,16 @@ contract CryptoVote {

// @title cancel questionnaire
function cancel(bytes32 _id) public onlyOwner returns (bool) {
require(isExist(_id) == true);
QuestionnaireList[_id].isExist = false;
QuestionnaireList[_id].contentsData = "";
QuestionnaireList[_id].numberOfChoices = 0;
QuestionnaireList[_id].voteStartAt = 0;
QuestionnaireList[_id].voteEndAt = 0;
QuestionnaireList[_id].createdAt = 0;

ResultList[_id].length = 0;
VoteLogList[_id] = VoteLog();

emit Canceled(_id);

Expand Down

0 comments on commit 77ab8d5

Please sign in to comment.