Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ jobs:
if: github.repository == 'BimberLabInternal/LabDevKitModules'
runs-on: ubuntu-latest
steps:
# Note: use slight delay in case there are associated commits across repos
- name: "Sleep for 30 seconds"
run: sleep 30s
shell: bash

- name: "Build DISCVR"
uses: bimberlabinternal/DevOps/githubActions/discvr-build@master
with:
Expand Down
34 changes: 26 additions & 8 deletions LDK/src/org/labkey/ldk/query/DefaultTableCustomizer.java
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,19 @@ private void setDetailsUrl(AbstractTableInfo ti)
}

String schemaName = ti.getUserSchema().getSchemaName();
assert schemaName != null;

String queryName = ti.getPublicName();
assert queryName != null;
if (queryName == null)
{
_log.error("TableInfo.getPublicName() was null", new Exception());
return;
}

List<String> keyFields = ti.getPkColumnNames();
assert !keyFields.isEmpty() : "No key fields found for the table: " + ti.getPublicSchemaName() + "." + ti.getPublicName();
if (keyFields.isEmpty())
{
_log.debug("No key fields found for the table, cannot set details URL: " + ti.getPublicSchemaName() + "." + ti.getPublicName());
return;
}

if (_settings.getPrimaryKeyField() != null)
{
Expand Down Expand Up @@ -169,13 +175,25 @@ else if (_settings.isSetEditLinkOverrides())
{
//otherwise apply custom urls
String schemaName = ti.getUserSchema().getSchemaName();
assert schemaName != null;

String queryName = ti.getPublicName();
assert queryName != null;
if (queryName == null)
{
_log.error("TableInfo.getPublicName() was null", new Exception());
return;
}

List<String> keyFields = ti.getPkColumnNames();
assert !keyFields.isEmpty() : "No key fields found for the table: " + ti.getPublicSchemaName() + "." + ti.getPublicName();
if (keyFields.isEmpty())
{
// There does not seem to be a more direct test for 'is editable'
if (ti.getUpdateService() == null)
{
return;
}

_log.debug("No key fields found for the table, cannot customize edit UI: " + ti.getPublicSchemaName() + "." + ti.getPublicName());
return;
}

if (_settings.getPrimaryKeyField() != null)
{
Expand Down