Skip to content

Commit

Permalink
set query environment before calling getDependencies() (#6153)
Browse files Browse the repository at this point in the history
  • Loading branch information
labkey-matthewb authored Dec 16, 2024
1 parent b4db734 commit f563f0f
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -864,6 +864,9 @@ public void run()
Map<Container, List<QuerySnapshotDefinition>> snapshotMap = new HashMap<>();
for (SnapshotDependency.SourceDataType sourceData : _sourceDataTypes)
{
// getDependencies() can execute LabKey SQL. Make sure environment is set up here.
// Also see 51200.
QueryService.get().setEnvironment(QueryService.Environment.CONTAINER, sourceData.getContainer());
for (QuerySnapshotDefinition snapshotDef : getDependencies(sourceData))
{
QueryService.get().setEnvironment(QueryService.Environment.CONTAINER, snapshotDef.getContainer());
Expand Down

0 comments on commit f563f0f

Please sign in to comment.