Skip to content

Commit

Permalink
Merge pull request #2 from anexia/fixes_custom_settings
Browse files Browse the repository at this point in the history
Fixes reading of custom settings
  • Loading branch information
nezhar authored Mar 29, 2023
2 parents baaba56 + 06bed44 commit 311b2aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drf_ip_restrictions/permissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 311b2aa

Please sign in to comment.