Skip to content

Commit

Permalink
Merge pull request #316 from Khenus/Khenus
Browse files Browse the repository at this point in the history
Fix Bug in storage check
  • Loading branch information
jerroldlam authored Nov 9, 2020
2 parents 47ba12f + 4075344 commit 7a3f65a
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/main/java/seedu/duke/storage/commons/FieldValidator.java
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,8 @@ public boolean validate() {
if (moduleWithLargestCap != null) {
ModuleValidator validator = new ModuleValidator();

if (!validator.isRetakeGrade(moduleWithLargestCap.getGrade())) {
isAllFieldValid = false;
details[INVALID_GRADE]++;
}

if (isAllFieldValid && moduleWithLargestCap.getCap() >= testModule.getCap()) {
if (!validator.isRetakeGrade(moduleWithLargestCap.getGrade())
&& moduleWithLargestCap.getCap() >= testModule.getCap()) {
isAllFieldValid = false;
details[INVALID_GRADE]++;
}
Expand Down

0 comments on commit 7a3f65a

Please sign in to comment.