Mercurial > hg > Members > nobuyasu > Consensus
changeset 45:0e8b6eda0a0e
commit
author | one |
---|---|
date | Thu, 04 Oct 2012 06:54:33 +0900 |
parents | 853bc291a3bb |
children | 49aa4ad3008f |
files | app/models/ClaimModel.java |
diffstat | 1 files changed, 10 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/app/models/ClaimModel.java Thu Oct 04 06:28:24 2012 +0900 +++ b/app/models/ClaimModel.java Thu Oct 04 06:54:33 2012 +0900 @@ -292,7 +292,7 @@ } private String checkChildClaimStatus(String...labels) { - Iterable<Vertex> iter = getVertex(Direction.OUT, labels); + Iterable<Vertex> iter = getVertex(Direction.OUT, labels); if (iter == null) { return null; } @@ -332,10 +332,15 @@ } private String checkAllChildsStatus() { - String status1 = checkQuestionAndSuggestionClaims(); - String status2 = checkRefutationClaims(); - if (status1.equals(status2)) { - return status1; + String queAndSugStatus = checkQuestionAndSuggestionClaims(); + String refutationStatus = checkRefutationClaims(); + if (refutationStatus.equals(FAILED)) { + return FAILED; + } + if (queAndSugStatus.equals(refutationStatus)) { + return queAndSugStatus; + } else if (refutationStatus.equals(FAILED)) { + return FAILED; } else { return UNKNOWN; }