Skip to content

Commit c6199ae

Browse files
committed
Avoid error when trying to customize locked table
1 parent d0dfe3c commit c6199ae

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

laboratory/src/org/labkey/laboratory/query/LaboratoryTableCustomizer.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,12 @@ public LaboratoryTableCustomizer(MultiValuedMap props)
7171
@Override
7272
public void customize(TableInfo ti)
7373
{
74+
if (ti.isLocked())
75+
{
76+
_log.debug("LaboratoryTableCustomizer called on a locked table: " + ti.getPublicSchemaName() + " / " + ti.getName(), new Exception());
77+
return;
78+
}
79+
7480
//apply defaults
7581
TableCustomizer tc = LDKService.get().getBuiltInColumnsCustomizer(true);
7682
tc.customize(ti);
@@ -164,7 +170,7 @@ else if (keyFields.size() != 1)
164170

165171
public void customizeColumns(AbstractTableInfo ti)
166172
{
167-
var container = ti.getMutableColumn("container");
173+
MutableColumnInfo container = ti.getMutableColumn("container");
168174
if (container == null)
169175
{
170176
container = ti.getMutableColumn("folder");

0 commit comments

Comments
 (0)