diff --git a/src/main/java/seedu/address/logic/commands/TagCommand.java b/src/main/java/seedu/address/logic/commands/TagCommand.java index 4e906004a5d..7f33ee45ac9 100644 --- a/src/main/java/seedu/address/logic/commands/TagCommand.java +++ b/src/main/java/seedu/address/logic/commands/TagCommand.java @@ -68,7 +68,7 @@ public TagCommand(Name nameToTag, UpdateStudentDescriptor tagsToAdd) { public CommandResult execute(Model model) throws CommandException { requireNonNull(model); - List lastShownList = model.getFilteredStudentList(); + List lastShownList = model.getAddressBook().getStudentList(); Optional optionalStudentToTag = lastShownList.stream() .filter(x -> x.getName() diff --git a/src/main/java/seedu/address/logic/commands/UpdateCommand.java b/src/main/java/seedu/address/logic/commands/UpdateCommand.java index 31f8af34de5..9c49f1ba165 100644 --- a/src/main/java/seedu/address/logic/commands/UpdateCommand.java +++ b/src/main/java/seedu/address/logic/commands/UpdateCommand.java @@ -78,7 +78,7 @@ public UpdateCommand(Name name, UpdateStudentDescriptor updateStudentDescriptor) @Override public CommandResult execute(Model model) throws CommandException { requireNonNull(model); - List lastShownList = model.getFilteredStudentList(); + List lastShownList = model.getAddressBook().getStudentList(); if (name.fullName.isEmpty()) { throw new CommandException(Messages.MESSAGE_INVALID_STUDENT_UPDATE); }