Skip to content

Commit

Permalink
Undo illegal edits to update command
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-setyawan committed Apr 11, 2024
1 parent 70b1818 commit 6b81701
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ public class UpdateCommand extends Command {
public static final String MESSAGE_UPDATE_PERSON_SUCCESS = "Updated Person ->\n%1$s";
public static final String MESSAGE_NOT_UPDATED = "At least one field to update must be provided.";
public static final String MESSAGE_DUPLICATE_PERSON = "This person already exists in the address book.";
// public static final String MESSAGE_NRIC_NOT_UPDATED = "NRIC cannot be updated."; (unsure if allowed)
private final Nric nric;
private final UpdatePersonDescriptor updatePersonDescriptor;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,6 @@ public UpdateCommand parse(String args) throws ParseException {
UpdatePersonDescriptor updatePersonDescriptor = new UpdatePersonDescriptor();
updatePersonDescriptor.setNric(nric);

/* unsure if allowed
if (argMultimap.getValue(PREFIX_NRIC).isPresent()) {
throw new ParseException(UpdateCommand.MESSAGE_NRIC_NOT_UPDATED);
} */

// Mandatory fields
if (argMultimap.getValue(PREFIX_NAME).isPresent()) {
updatePersonDescriptor.setName(ParserUtil.parseName(argMultimap.getValue(PREFIX_NAME).get()));
Expand Down

0 comments on commit 6b81701

Please sign in to comment.