diff --git a/src/main/java/seedu/address/storage/JsonAdaptedPerson.java b/src/main/java/seedu/address/storage/JsonAdaptedPerson.java index fc4816987b2..3a82d631140 100644 --- a/src/main/java/seedu/address/storage/JsonAdaptedPerson.java +++ b/src/main/java/seedu/address/storage/JsonAdaptedPerson.java @@ -149,6 +149,7 @@ public Person toModelType() throws IllegalValueException { throw new IllegalValueException(Subject.MESSAGE_CONSTRAINTS); } final Subject modelSubject = new Subject(subject); + if (attendance == null) { throw new IllegalValueException(String.format(MISSING_FIELD_MESSAGE_FORMAT, Attendance.class.getSimpleName())); @@ -160,7 +161,7 @@ public Person toModelType() throws IllegalValueException { if (payment == null) { throw new IllegalValueException(String.format(MISSING_FIELD_MESSAGE_FORMAT, - Attendance.class.getSimpleName())); + Payment.class.getSimpleName())); } if (!Payment.isValidPayment(payment)) { throw new IllegalValueException(Payment.MESSAGE_CONSTRAINTS);