Skip to content

Commit

Permalink
reorder steps
Browse files Browse the repository at this point in the history
  • Loading branch information
SKairinos committed Jun 24, 2024
1 parent c284052 commit 5d4a7e7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions codeforlife/mail.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,16 +178,16 @@ def remove_contact(
"""
# pylint: enable=line-too-long

if identifier == "email":
value = value.lower()

Check warning on line 182 in codeforlife/mail.py

View check run for this annotation

Codecov / codecov/patch

codeforlife/mail.py#L181-L182

Added lines #L181 - L182 were not covered by tests

if not settings.MAIL_ENABLED:
logging.info("Removed contact from DotDigital: %s", value)
return True

Check warning on line 186 in codeforlife/mail.py

View check run for this annotation

Codecov / codecov/patch

codeforlife/mail.py#L185-L186

Added lines #L185 - L186 were not covered by tests

if auth is None:
auth = settings.MAIL_AUTH

if identifier == "email":
value = value.lower()

response = requests.delete(

Check warning on line 191 in codeforlife/mail.py

View check run for this annotation

Codecov / codecov/patch

codeforlife/mail.py#L191

Added line #L191 was not covered by tests
# pylint: disable-next=line-too-long
url=f"https://{region}-api.dotdigital.com/contacts/v3/{identifier}/{value}",
Expand Down

0 comments on commit 5d4a7e7

Please sign in to comment.