Skip to content

Commit

Permalink
Fix Issue with Extra Loan History Population
Browse files Browse the repository at this point in the history
  • Loading branch information
rui-han-crh committed Oct 27, 2022
1 parent 3aa5776 commit 7aecd3b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ public AddCommand parse(String args) throws ParseException {
Birthday birthday = ParserUtil.parseBirthday(argMultimap.getValue(PREFIX_BIRTHDAY).get());
Set<Tag> tagList = ParserUtil.parseTags(argMultimap.getAllValues(PREFIX_TAG), model);
Loan loan = ParserUtil.parseLoan(argMultimap.getValue(PREFIX_LOAN).orElse("0"));

// construct empty loan history
List<LoanHistory> history = new ArrayList<>();
LoanHistory init = new LoanHistory(loan, new Reason("initial"));
history.add(init);

Person person = new Person(name, phone, email, address, birthday, tagList, loan, history);

Expand Down

0 comments on commit 7aecd3b

Please sign in to comment.