Skip to content

Commit

Permalink
Update cloudflare.py to consider "priority" when posting
Browse files Browse the repository at this point in the history
failed to add MX record as 'priority' is required for MX record.
  • Loading branch information
piengeng committed Oct 5, 2023
1 parent a0440b0 commit a3eeb96
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/lexicon/_private/providers/cloudflare.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ def create_record(self, rtype, name, content):
}
if self._get_lexicon_option("ttl"):
data["ttl"] = self._get_lexicon_option("ttl")
if self._get_lexicon_option("priority"):
if self._get_lexicon_option("priority").isnumeric():
data["priority"] = int(self._get_lexicon_option("priority"))

payload = {"success": True}
try:
Expand Down

0 comments on commit a3eeb96

Please sign in to comment.