From cf9391498c7696fe7c0b5c982071c1fe49d3e97b Mon Sep 17 00:00:00 2001 From: labkey-nicka Date: Mon, 6 Oct 2025 09:10:12 -0700 Subject: [PATCH] ListItemDetailsAction: improve parameter resolution --- list/src/org/labkey/list/controllers/ListController.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/list/src/org/labkey/list/controllers/ListController.java b/list/src/org/labkey/list/controllers/ListController.java index 78a641ffec7..55ae902662f 100644 --- a/list/src/org/labkey/list/controllers/ListController.java +++ b/list/src/org/labkey/list/controllers/ListController.java @@ -894,8 +894,8 @@ public ModelAndView getView(ListItemDetailsForm form, BindException errors) if (_list == null) { - int listId = form.getListId(); - if (listId > 0) + Integer listId = form.getListId(); + if (listId != null && listId > 0) _list = ListService.get().getList(getContainer(), listId); } @@ -906,7 +906,10 @@ public ModelAndView getView(ListItemDetailsForm form, BindException errors) String oldRecord = null; String newRecord = null; - int eventRowId = form.getRowId(); + Integer eventRowId = form.getRowId(); + if (eventRowId == null || eventRowId <= 0) + return HtmlView.of("Unable to resolve event details. An event \"rowId\" must be specified."); + ListAuditProvider.ListAuditEvent event = AuditLogService.get().getAuditEvent(getUser(), ListManager.LIST_AUDIT_EVENT, eventRowId); if (event != null)