Skip to content

A community-supported supercharged document management system: scan, index and archive all your documents

Determine the start of the financial only for wrapping years.

David Martin67b492bcb7c4
diff --git a/src/documents/admin.py b/src/documents/admin.py
index e96e0f04a..e239a99cb 100644
--- a/src/documents/admin.py
+++ b/src/documents/admin.py
@@ -63,9 +63,9 @@ class FinancialYearFilter(admin.SimpleListFilter):
def _determine_fy(self, date):
"""Return a (query, display) financial year tuple of the given date."""
- fy_start = self._fy_start(date.year)
-
if self._fy_does_wrap():
+ fy_start = self._fy_start(date.year)
+
if date.date() >= fy_start:
query = "{}-{}".format(date.year, date.year + 1)
else: