Skip to content

Commit

Permalink
Merge 2470236 into 28a3c7f
Browse files Browse the repository at this point in the history
  • Loading branch information
luhan02 committed Nov 12, 2018
2 parents 28a3c7f + 2470236 commit 9c11052
Showing 1 changed file with 3 additions and 2 deletions.
Expand Up @@ -50,7 +50,7 @@ public class UpdateTaskCommand extends Command {

public static final String MESSAGE_UPDATE_TASK_SUCCESS = "Updated Task: %1$s";
public static final String MESSAGE_NOT_EDITED = "At least one field to edit must be provided.";
public static final String MESSAGE_DUPLICATE_TASK = "This task already exists in the task book.";
//public static final String MESSAGE_DUPLICATE_TASK = "This task already exists in the task book.";


private final Index index;
Expand Down Expand Up @@ -84,9 +84,10 @@ public CommandResult execute(Model model, CommandHistory history) throws Command
//model.updateFilteredTaskList(PREDICATE_SHOW_ALL_TASKS);
model.commitTaskBook();

/*
if (!taskToUpdate.isSameTask(updatedTask) && model.hasTask(updatedTask)) {
throw new CommandException(MESSAGE_DUPLICATE_TASK);
}
}*/

return new CommandResult(String.format(MESSAGE_UPDATE_TASK_SUCCESS, updatedTask));
}
Expand Down

0 comments on commit 9c11052

Please sign in to comment.