Skip to content

Commit 77108da

Browse files
brendanx67claude
andauthored
Fixed mutating SQL assertion in Tool Store download action (#608)
* Wrapped recordToolDownload in ignoreSqlUpdates() for dev-mode compatibility Co-authored-by: Claude <noreply@anthropic.com>
1 parent a0363d2 commit 77108da

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

SkylineToolsStore/src/org/labkey/skylinetoolsstore/SkylineToolsStoreController.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1088,7 +1088,12 @@ else if (toolLsid != null &&
10881088
// Cookie expires after 1 day
10891089
final int expires = 24 * 60 * 60;
10901090

1091-
SkylineToolsStoreManager.get().recordToolDownload(tool);
1091+
// Download counter is an incidental write on a GET action — use ignoreSqlUpdates()
1092+
// to avoid the dev-mode mutating SQL assertion (like auditing writes)
1093+
try (var ignored = SpringActionController.ignoreSqlUpdates())
1094+
{
1095+
SkylineToolsStoreManager.get().recordToolDownload(tool);
1096+
}
10921097

10931098
DateFormat df = new SimpleDateFormat("EEE, dd-MMM-yyyy HH:mm:ss 'GMT'", Locale.US);
10941099
Calendar calendar = Calendar.getInstance();

0 commit comments

Comments
 (0)