From dd6d8029a52cccf56923b370687be63aff4c0786 Mon Sep 17 00:00:00 2001 From: Anton Wolkov <7001904+phntom@users.noreply.github.com> Date: Wed, 2 Mar 2022 14:51:03 +0200 Subject: [PATCH] typo in cloudflare.py fixed ability to add email-fwdr here's my code if anyone wants to add an email request validation: ```python cf = CloudFlare(email=CLOUDFLARE_EMAIL, token=CLOUDFLARE_TOKEN) cf.add('VOID', "accounts", "email-fwdr") cf.add('AUTH', "accounts", "email-fwdr", "addresses") data = json.dumps({"email": email}) cf.accounts.email_fwdr.addresses.post(CLOUDFLARE_ACCOUNT, data=data) ``` --- CloudFlare/cloudflare.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CloudFlare/cloudflare.py b/CloudFlare/cloudflare.py index aa6da20..ae4b4d5 100644 --- a/CloudFlare/cloudflare.py +++ b/CloudFlare/cloudflare.py @@ -826,7 +826,7 @@ def add(self, t, p1, p2=None, p3=None): for element in a[0:-1]: try: if '-' in element: - branch = getattr(element, element.replace('-','_')) + branch = getattr(branch, element.replace('-','_')) else: branch = getattr(branch, element) except: