Fix transaction filtering by budgets

This commit is contained in:
William Brawner 2020-02-19 21:25:23 -07:00
parent 5182c85e96
commit b381cf20d6

View file

@ -47,8 +47,9 @@ open class TransactionController(
@RequestParam sortOrder: Sort.Direction?
): ResponseEntity<List<TransactionResponse>> {
val budgets = if (budgetIds != null) {
userPermissionsRepository.findAllByUser(
userPermissionsRepository.findAllByUserAndBudget_IdIn(
user = getCurrentUser()!!,
budgetIds = budgetIds.toList(),
pageable = PageRequest.of(page ?: 0, count ?: 1000))
} else {
userPermissionsRepository.findAllByUser(getCurrentUser()!!, null)