Skip to content

Commit ea8af57

Browse files
authored
Merge pull request #272 from LabKey/fb_merge_25.7_to_develop
Merge discvr-25.7 to develop
2 parents a5fe671 + 05e8ffe commit ea8af57

File tree

2 files changed

+31
-8
lines changed

2 files changed

+31
-8
lines changed

.github/workflows/build.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ jobs:
1010
if: github.repository == 'BimberLabInternal/LabDevKitModules'
1111
runs-on: ubuntu-latest
1212
steps:
13+
# Note: use slight delay in case there are associated commits across repos
14+
- name: "Sleep for 30 seconds"
15+
run: sleep 30s
16+
shell: bash
17+
1318
- name: "Build DISCVR"
1419
uses: bimberlabinternal/DevOps/githubActions/discvr-build@master
1520
with:

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

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -118,13 +118,19 @@ private void setDetailsUrl(AbstractTableInfo ti)
118118
}
119119

120120
String schemaName = ti.getUserSchema().getSchemaName();
121-
assert schemaName != null;
122-
123121
String queryName = ti.getPublicName();
124-
assert queryName != null;
122+
if (queryName == null)
123+
{
124+
_log.error("TableInfo.getPublicName() was null", new Exception());
125+
return;
126+
}
125127

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

129135
if (_settings.getPrimaryKeyField() != null)
130136
{
@@ -169,13 +175,25 @@ else if (_settings.isSetEditLinkOverrides())
169175
{
170176
//otherwise apply custom urls
171177
String schemaName = ti.getUserSchema().getSchemaName();
172-
assert schemaName != null;
173-
174178
String queryName = ti.getPublicName();
175-
assert queryName != null;
179+
if (queryName == null)
180+
{
181+
_log.error("TableInfo.getPublicName() was null", new Exception());
182+
return;
183+
}
176184

177185
List<String> keyFields = ti.getPkColumnNames();
178-
assert !keyFields.isEmpty() : "No key fields found for the table: " + ti.getPublicSchemaName() + "." + ti.getPublicName();
186+
if (keyFields.isEmpty())
187+
{
188+
// There does not seem to be a more direct test for 'is editable'
189+
if (ti.getUpdateService() == null)
190+
{
191+
return;
192+
}
193+
194+
_log.debug("No key fields found for the table, cannot customize edit UI: " + ti.getPublicSchemaName() + "." + ti.getPublicName());
195+
return;
196+
}
179197

180198
if (_settings.getPrimaryKeyField() != null)
181199
{

0 commit comments

Comments
 (0)