Skip to content

Commit c6d7565

Browse files
committed
Edit UpdateCommand.java
1 parent d2eda09 commit c6d7565

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/seedu/address/logic/commands/UpdateCommand.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public CommandResult execute(Model model) throws CommandException {
9292
new NricContainsKeywordsPredicate(nric.toString())).findFirst().get();
9393
Person updatedPerson = createUpdatedPerson(personToUpdate, updatePersonDescriptor);
9494

95-
if (!personToUpdate.isSamePerson(updatedPerson) && model.hasPerson(updatedPerson)) {
95+
if (!(personToUpdate.isSamePerson(updatedPerson) && model.hasPerson(updatedPerson))) {
9696
throw new CommandException(MESSAGE_DUPLICATE_PERSON);
9797
}
9898

0 commit comments

Comments
 (0)