From 1f2b83cb0d75b25d597562680a9b19e33d40f273 Mon Sep 17 00:00:00 2001 From: Abdullah Alaqeel Date: Tue, 20 Sep 2022 12:15:21 +0300 Subject: [PATCH] fix: improved django version check in the middleware --- maintenancemode/middleware.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/maintenancemode/middleware.py b/maintenancemode/middleware.py index b77f179..2f01b7c 100644 --- a/maintenancemode/middleware.py +++ b/maintenancemode/middleware.py @@ -51,7 +51,7 @@ def process_request(self, request): return None # Otherwise show the user the 503 page - if (DJANGO_VERSION_MAJOR == 3 and DJANGO_VERSION_MINOR <= 2) or DJANGO_VERSION_MAJOR < 3: + if (DJANGO_VERSION_MAJOR == 3 and DJANGO_VERSION_MINOR < 2) or DJANGO_VERSION_MAJOR < 3: # Checks if DJANGO version is less than 3.2.0 for breaking change resolver = get_resolver()