ifs-data-layer/ifs-data-service/src/main/java/org/innovateuk/ifs/finance/controller/ProjectFinanceRowController.java
/**
     * Save the updated FinanceRowItem in project finances and if there are validation messages, return those (but still save)
     * @return ValidationMessages resource object to store validation messages about invalid user input.
     */
Save the updated FinanceRowItem in project finances and if there are validation messages, return those (but still save)
@return ValidationMessages resource object to store validation messages about invalid user input.
Save the updated FinanceRowItem in project finances and if there are validation messages return those ( but still save ) @return ValidationMessages resource object to store validation messages about invalid user input .
@PutMapping("/{id}")
    public RestResult<ValidationMessages> update(@PathVariable final long id, @RequestBody final FinanceRowItem financeRowItem) {
        ValidationMessages validationMessages = validationUtil.validateProjectCostItem(financeRowItem);
        if(!validationMessages.hasErrors()){
            RestResult<FinanceRowItem> updateResult = projectFinanceRowService.update(id, financeRowItem).toGetResponse();
            if (updateResult.isFailure()) {
                return restFailure(updateResult.getFailure());
            }
        }
        return restSuccess(validationMessages);
    }
@ PutMapping ( "/{id}" ) public RestResult < ValidationMessages > update ( @ PathVariable final long id , @ RequestBody final FinanceRowItem financeRowItem ) { ValidationMessages validationMessages = validationUtil . validateProjectCostItem ( financeRowItem ) ; if ( ! validationMessages . hasErrors ( ) ) { RestResult < FinanceRowItem > updateResult = projectFinanceRowService . update ( id , financeRowItem ) . toGetResponse ( ) ; if ( updateResult . isFailure ( ) ) { return restFailure ( updateResult . getFailure ( ) ) ; } } return restSuccess ( validationMessages ) ; }
Save the updated FinanceRowItem in project finances and if there are validation messages, return those (but still save)
 @return ValidationMessages resource object to store validation messages about invalid user input.
Save the updated FinanceRowItem in project finances and if there are validation messages return those ( but still save ) @return ValidationMessages resource object to store validation messages about invalid user input .