Skip to content

Commit

Permalink
chore: merged if condition
Browse files Browse the repository at this point in the history
- cleardb removed in update period
  • Loading branch information
naneey committed Nov 6, 2023
1 parent d3857f8 commit 659b0c7
Showing 1 changed file with 3 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1249,8 +1249,8 @@ private void updateMilestoneDB(String milestonePrefix,String progressPrefix, int
prepVote.set(VOTE,0);
}
clearArrayDb(MilestoneDb.votersList.at(milestonePrefix));
removeArrayItem(milestoneSubmitted.at(progressPrefix),milestoneId);
clearArrayDb(ProgressReportDataDb.votersReasons.at(progressPrefix));// TODO: removing milestone submitted and voteReason
// removeArrayItem(milestoneSubmitted.at(progressPrefix),milestoneId);
// clearArrayDb(ProgressReportDataDb.votersReasons.at(progressPrefix));// TODO: removing milestone submitted and voteReason
}

/***
Expand Down Expand Up @@ -2188,19 +2188,12 @@ private void updateApplicationResult() {
period.periodName.set(APPLICATION_PERIOD);
PeriodUpdate("Period Updated back to Application Period due to less Registered P-Reps Count");

} else if (getProposalsKeysByStatus(PENDING).size() == 0 && status.progressReportStatus.get(WAITING).size() == 0 && activeProposals.size() + status.paused.size() == 0) {
} else if (getProposalsKeysByStatus(PENDING).size() == 0 && status.progressReportStatus.get(WAITING).size() == 0 && activeProposals.size() + status.paused.size() >= 0) {
createActiveProposalDb();
checkProgressReportSubmission();
period.periodName.set(APPLICATION_PERIOD);
PeriodUpdate("Period Updated back to Application Period due not enough " +
"Voting Proposals or Progress Reports.");
} else if (status.pending.size() == 0 && status.waitingProgressReports.size() == 0 && activeProposals.size() + status.paused.size() > 0) {
createActiveProposalDb();
checkProgressReportSubmission();
period.periodName.set(APPLICATION_PERIOD);
PeriodUpdate("Period Updated back to Application Period due not enough " +
"Voting Proposals or Progress Reports.");

} else {
createActiveProposalDb();
PeriodUpdate("Period Updated to Voting Period");
Expand Down

0 comments on commit 659b0c7

Please sign in to comment.