Skip to content

Commit

Permalink
Merge pull request #158 from hm-yang1/Fix-add-delivery-command
Browse files Browse the repository at this point in the history
Minor update to edit and add commands
  • Loading branch information
hm-yang1 authored Nov 1, 2024
2 parents bc495c9 + c557432 commit 0190e8d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
4 changes: 0 additions & 4 deletions src/main/java/seedu/address/logic/commands/EditCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -192,10 +192,6 @@ private CommandResult editDelivery() throws CommandException {
Delivery deliveryToEdit = deliveryList.get(index.getZeroBased());
assert editDeliveryDescriptor != null;

if (editDeliveryDescriptor.getItems().isEmpty()) {
throw new CommandException(MESSAGE_EMPTY_ITEMS);
}

Delivery editedDelivery = createEditedDelivery(deliveryToEdit, editDeliveryDescriptor);
inspectedPerson.setDelivery(deliveryToEdit, editedDelivery);
return new CommandResult(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,7 @@ public AddCommand parse(String args) throws ParseException {
PREFIX_ETA,
PREFIX_ADDRESS,
PREFIX_COST,
PREFIX_STATUS,
PREFIX_TAG
PREFIX_STATUS
) || !argMultimap.getPreamble().isEmpty()) {
throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,
AddCommand.MESSAGE_USAGE_DELIVERY));
Expand Down

0 comments on commit 0190e8d

Please sign in to comment.