Skip to content

Commit

Permalink
Added Bot Management ability and fixed an edge case for the API return
Browse files Browse the repository at this point in the history
  • Loading branch information
JaredPage committed Mar 3, 2022
1 parent 4c80399 commit 8b0d26c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CloudFlare/api_v4.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ def zones(self):
self.add('AUTH', "zones", "activation_check")
self.add('AUTH', "zones", "available_plans")
self.add('AUTH', "zones", "available_rate_plans")
self.add('AUTH', "zones", "bot_management")
self.add('AUTH', "zones", "custom_certificates")
self.add('AUTH', "zones", "custom_certificates/prioritize")
self.add('AUTH', "zones", "custom_hostnames")
Expand Down
2 changes: 1 addition & 1 deletion CloudFlare/cloudflare.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ def _call(self, method, headers, parts,
response_data['success'] = True

if response_data['success'] is False:
if 'errors' in response_data:
if 'errors' in response_data and response_data['errors'] != None:
errors = response_data['errors'][0]
else:
errors = {}
Expand Down

0 comments on commit 8b0d26c

Please sign in to comment.