From 38c5b9bf02f971af6ce8fe338924eb9fb6d50659 Mon Sep 17 00:00:00 2001 From: Luke Shingles Date: Mon, 22 Jul 2024 05:38:43 +0100 Subject: [PATCH 1/2] Update countryrestriction.py --- atlasserver/forcephot/countryrestriction.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/atlasserver/forcephot/countryrestriction.py b/atlasserver/forcephot/countryrestriction.py index f22e73b..287b4ec 100644 --- a/atlasserver/forcephot/countryrestriction.py +++ b/atlasserver/forcephot/countryrestriction.py @@ -9,6 +9,8 @@ class CountryRestrictionMiddleware(MiddlewareMixin): """Restrict access to users that are not in an allowed country.""" + log_message = "" + def __init__(self, *args, **kwargs): if not isinstance(MiddlewareMixin, object): super().__init__(*args, **kwargs) From cc55d45f4b500e1ec72b44b8612f5023a7051697 Mon Sep 17 00:00:00 2001 From: Luke Shingles Date: Mon, 22 Jul 2024 09:07:22 +0100 Subject: [PATCH 2/2] Update countryrestriction.py --- atlasserver/forcephot/countryrestriction.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/atlasserver/forcephot/countryrestriction.py b/atlasserver/forcephot/countryrestriction.py index 287b4ec..35ac9a0 100644 --- a/atlasserver/forcephot/countryrestriction.py +++ b/atlasserver/forcephot/countryrestriction.py @@ -9,14 +9,13 @@ class CountryRestrictionMiddleware(MiddlewareMixin): """Restrict access to users that are not in an allowed country.""" - log_message = "" - def __init__(self, *args, **kwargs): if not isinstance(MiddlewareMixin, object): super().__init__(*args, **kwargs) def process_request(self, request): block_message = None + log_message = "" country_code = request.geo_data["country_code"] if country_code in ["BY", "RU"]: