Skip to content

Commit

Permalink
Issue 51557: Avoid folder deletion summary stats type casting (#6070)
Browse files Browse the repository at this point in the history
  • Loading branch information
labkey-nicka authored Nov 20, 2024
1 parent 5221b10 commit 41b46d2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
9 changes: 8 additions & 1 deletion api/src/org/labkey/api/exp/query/ExpDataClassTable.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
*/
package org.labkey.api.exp.query;

import org.labkey.api.query.FieldKey;

/**
* User: kevink
* Date: 9/21/15
Expand All @@ -36,6 +38,11 @@ enum Column
SampleSet,
Category,
DataCount,
ImportAliases
ImportAliases;

public FieldKey fieldKey()
{
return FieldKey.fromParts(name());
}
}
}
8 changes: 4 additions & 4 deletions experiment/src/org/labkey/experiment/ExperimentModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -889,10 +889,10 @@ public Collection<String> getSummary(Container c)
columns.add(ExpDataClassTable.Column.Name.name());
columns.add(ExpDataClassTable.Column.DataCount.name());

Map<String, Integer> results = new TableSelector(table, columns).getValueMap();
Map<String, Number> results = new TableSelector(table, columns).getValueMap();
for (var entry : results.entrySet())
{
int count = entry.getValue();
long count = entry.getValue().longValue();
if (count > 0)
summaries.add(new Summary(count, entry.getKey()));
}
Expand All @@ -917,10 +917,10 @@ public Collection<String> getSummary(Container c)
columns.add(ExpSampleTypeTable.Column.Name.name());
columns.add(ExpSampleTypeTable.Column.SampleCount.name());

Map<String, Integer> results = new TableSelector(table, columns).getValueMap();
Map<String, Number> results = new TableSelector(table, columns).getValueMap();
for (var entry : results.entrySet())
{
int count = entry.getValue();
long count = entry.getValue().longValue();
if (count > 0)
{
String name = entry.getKey();
Expand Down

0 comments on commit 41b46d2

Please sign in to comment.