diff --git a/HISTORY.rst b/HISTORY.rst index 5abaccc472..ef6c8feb57 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -108,7 +108,8 @@ - Add support for groups ACLs. - Sort permission namespaces and permissions in the role permission views. - Invert the columns in the ACL detail view. - +- Fix issue #454. Thanks to Andrei Korostelev @kindkaktus for the issue and the + solution. 2.7.3 (2017-09-11) ================== diff --git a/docs/releases/3.0.rst b/docs/releases/3.0.rst index a231a24cd4..8be596c1d8 100644 --- a/docs/releases/3.0.rst +++ b/docs/releases/3.0.rst @@ -423,5 +423,6 @@ Bugs fixed or issues closed =========================== * `GitLab issue #262 `_ Event notifications +* `GitLab issue #454 `_ Invalid next month calculation in statistics app, causes failstop .. _PyPI: https://pypi.python.org/pypi/mayan-edms/ diff --git a/mayan/apps/documents/statistics.py b/mayan/apps/documents/statistics.py index a7b5773101..0a3a37383e 100644 --- a/mayan/apps/documents/statistics.py +++ b/mayan/apps/documents/statistics.py @@ -98,7 +98,7 @@ def total_document_per_month(): for month in range(1, datetime.date.today().month + 1): next_month = month + 1 - if next_month == 12: + if month == 12: next_month = 1 year = this_year + 1 else: @@ -129,7 +129,7 @@ def total_document_version_per_month(): for month in range(1, datetime.date.today().month + 1): next_month = month + 1 - if next_month == 12: + if month == 12: next_month = 1 year = this_year + 1 else: @@ -160,7 +160,7 @@ def total_document_page_per_month(): for month in range(1, datetime.date.today().month + 1): next_month = month + 1 - if next_month == 12: + if month == 12: next_month = 1 year = this_year + 1 else: