Skip to content

Commit fd993c8

Browse files
Issue 39403: NPE when customizing table with disabled details link in EHR_ComplianceDB linked schema
1 parent 00d5cff commit fd993c8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

LDK/src/org/labkey/ldk/query/DefaultTableCustomizer.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,8 @@ private void setDetailsUrl(AbstractTableInfo ti)
126126

127127
String keyField = keyFields.get(0);
128128
StringExpression se = ti.getDetailsURL(null, ti.getUserSchema().getContainer());
129-
if (se == null || se.toString().contains("detailsQueryRow"))
129+
// Handle a null source string, which you get when the URL is a AbstractTableInfo.LINK_DISABLER. See issue 39403
130+
if (se == null || se.toString() == null || se.toString().contains("detailsQueryRow"))
130131
{
131132
ti.setDetailsURL(DetailsURL.fromString("/query/recordDetails.view?schemaName=" + schemaName + "&query.queryName=" + queryName + "&keyField=" + keyField + "&key=${" + keyField + "}"));
132133
}

0 commit comments

Comments
 (0)