[FIX] 日付の設定をデフォルト値を設定しました。
This commit is contained in:
@@ -128,6 +128,10 @@ public class TransactionController {
|
|||||||
@GetMapping("/transaction/create")
|
@GetMapping("/transaction/create")
|
||||||
public String createOneGet(@RequestParam(defaultValue = "") LocalDate today,
|
public String createOneGet(@RequestParam(defaultValue = "") LocalDate today,
|
||||||
Model model) {
|
Model model) {
|
||||||
|
|
||||||
|
if (today == null) {
|
||||||
|
today = LocalDate.now();
|
||||||
|
}
|
||||||
|
|
||||||
List<CategoryForm> categoryFormList = CategoryForm.convertFrom(categoryService.findAll());
|
List<CategoryForm> categoryFormList = CategoryForm.convertFrom(categoryService.findAll());
|
||||||
|
|
||||||
@@ -164,7 +168,7 @@ public class TransactionController {
|
|||||||
public String updateOneGet(@RequestParam Long transactionId, @RequestParam(defaultValue = "") LocalDate today,
|
public String updateOneGet(@RequestParam Long transactionId, @RequestParam(defaultValue = "") LocalDate today,
|
||||||
Model model) {
|
Model model) {
|
||||||
|
|
||||||
if (today.equals(null)) {
|
if (today == null) {
|
||||||
today = LocalDate.now();
|
today = LocalDate.now();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user