diff --git a/src/main/java/seedu/address/model/AppointmentBook.java b/src/main/java/seedu/address/model/AppointmentBook.java index e12151a4482..2df21aa14b0 100644 --- a/src/main/java/seedu/address/model/AppointmentBook.java +++ b/src/main/java/seedu/address/model/AppointmentBook.java @@ -129,7 +129,6 @@ public Appointment addAppointment(Person person, AppointmentDescriptor appointme */ public void setAppointment(Appointment target, Appointment editedAppointment) { requireNonNull(editedAppointment); - appointments.setAppointment(target, editedAppointment); } diff --git a/src/main/java/seedu/address/model/appointment/UniqueAppointmentList.java b/src/main/java/seedu/address/model/appointment/UniqueAppointmentList.java index 5ef02a397a3..256b5652e5b 100644 --- a/src/main/java/seedu/address/model/appointment/UniqueAppointmentList.java +++ b/src/main/java/seedu/address/model/appointment/UniqueAppointmentList.java @@ -125,7 +125,7 @@ public void setAppointments(List appointments) { */ public void removeAppointmentsForPerson(Person toRemove) { requireNonNull(toRemove); - internalList.removeIf(appointment -> appointment.getPerson().equals(toRemove)); + internalList.removeIf(appointment -> appointment.getPersonId() == toRemove.getPersonId()); } /**