Skip to content

Commit

Permalink
Revert source as optional for add command
Browse files Browse the repository at this point in the history
Although this is planned for implementation, it causes breaking changes
with loading from the json on its own. Requires future review.
  • Loading branch information
H4mes committed Mar 21, 2024
1 parent eef4f9d commit 1da3e54
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ public AddArticleCommand parse(String args) throws ParseException {
ArgumentMultimap argMultimap =
ArgumentTokenizer.tokenize(args, PREFIX_TITLE, PREFIX_AUTHOR, PREFIX_PUBLICATION_DATE, PREFIX_SOURCE,
PREFIX_CATEGORY, PREFIX_STATUS);

if (!arePrefixesPresent(argMultimap, PREFIX_TITLE, PREFIX_AUTHOR, PREFIX_PUBLICATION_DATE,
//Temporarily reinstate source requirement
if (!arePrefixesPresent(argMultimap, PREFIX_TITLE, PREFIX_AUTHOR, PREFIX_PUBLICATION_DATE, PREFIX_SOURCE,
PREFIX_CATEGORY, PREFIX_STATUS) || !argMultimap.getPreamble().isEmpty()) {
throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddArticleCommand.MESSAGE_USAGE));
}
Expand Down

0 comments on commit 1da3e54

Please sign in to comment.