Skip to content

Commit

Permalink
fix(SILVA-515): fixed timeframe on default values
Browse files Browse the repository at this point in the history
  • Loading branch information
paulushcgcj committed Dec 5, 2024
1 parent 41bedd5 commit 1f50d06
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ public ResponseEntity<List<OpeningsPerYearDto>> getOpeningsSubmissionTrends(

List<OpeningsPerYearDto> resultList =
openingTrendsService.getOpeningSubmissionTrends(
getDateOrDefault(entryDateStart,LocalDate.now()),
getDateOrDefault(entryDateStart,LocalDate.now().minusYears(1)),
getDateOrDefault(entryDateEnd,
//If we have an end date, we get it, otherwise we use the current date,
// and no matter if we have the start date or not, we add a year to the end date
getDateOrDefault(entryDateStart,LocalDate.now()).plusYears(1)
getDateOrDefault(entryDateStart,LocalDate.now().minusYears(1)).plusYears(1)
),
orgUnits,
statusCodes
Expand Down

0 comments on commit 1f50d06

Please sign in to comment.