Skip to content

Commit

Permalink
fix task retrieval query
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeh committed Feb 24, 2025
1 parent 3139616 commit c726703
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -523,11 +523,10 @@ export class ImpactCalculator {
const repository = this.dataSource.getRepository(SourcingLocation);
// For testing purposes, track locations with no production in task, will remove this later
const locationIdsWithNoProduction: string[] = [];
const { id } = await this.taskService.taskRepository.findOneOrFail({
order: {
updatedAt: 'DESC',
},
});
const { id } = await this.taskService.taskRepository
.createQueryBuilder('task')
.orderBy('task.updatedAt', 'DESC')
.getOneOrFail();

// Group records by location where production is 0 or null
// TODO: We must apply this when harvesting is 0 as well, but given the use of this approach is not straightforward, and how to apply the new values
Expand Down

0 comments on commit c726703

Please sign in to comment.