From d053a6289a17eb7cc34e53e1986c1659b1bca21e Mon Sep 17 00:00:00 2001 From: Bohdan Odintsov Date: Tue, 7 Jan 2025 15:55:34 +0200 Subject: [PATCH] fixed yearmonth method --- osf_tests/metrics/test_monthly_report.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osf_tests/metrics/test_monthly_report.py b/osf_tests/metrics/test_monthly_report.py index 0c0302a7f08..3c841e6555c 100644 --- a/osf_tests/metrics/test_monthly_report.py +++ b/osf_tests/metrics/test_monthly_report.py @@ -135,7 +135,7 @@ def test_with_last_month(self, osfid, this_month_report, last_month_report, two_ def _prior_yearmonth(ym: YearMonth) -> YearMonth: return ( - YearMonth(ym.year - 1, 1) + YearMonth(ym.year - 1, 12) if ym.month == 1 else YearMonth(ym.year, ym.month - 1) )