diff --git a/drf_ip_restrictions/permissions.py b/drf_ip_restrictions/permissions.py index 74fcc9f..a4654cf 100644 --- a/drf_ip_restrictions/permissions.py +++ b/drf_ip_restrictions/permissions.py @@ -14,7 +14,7 @@ def has_permission(self, request, view): if client_ip: settings = ip_restriction_settings() - allowed_ips = getattr(settings, self.setting_ip_list) + allowed_ips = settings.user_settings[self.setting_ip_list] for allowed_ip in allowed_ips: if client_ip == allowed_ip or client_ip.startswith(allowed_ip): return True