Skip to content

Fix null value in DigitalOcean create a record#1570

Merged
Kami merged 1 commit into
apache:trunkfrom
karantan:fix/digitalocean-extra
May 2, 2021
Merged

Fix null value in DigitalOcean create a record#1570
Kami merged 1 commit into
apache:trunkfrom
karantan:fix/digitalocean-extra

Conversation

@karantan
Copy link
Copy Markdown
Contributor

Fix null value in DigitalOcean create a record

Description

This fixes "field could not be unmarshalled" error when trying to send
'null' as a boolean value. It needs to be int or bool, not a string.

Ref: https://developers.digitalocean.com/documentation/v2/#create-a-new-domain-record

Status

Replace this: describe the PR status. Examples:

  • done, ready for review

Checklist (tick everything that applies)

  • Code linting (required, can be done after the PR checks)
  • Documentation
  • Tests
  • [ ] ICLA (required for bigger changes)

This fixes "field could not be unmarshalled" error when trying to send
'null' as a boolean value. It needs to be int or bool, not a string.

Ref: https://developers.digitalocean.com/documentation/v2/#create-a-new-domain-record
Copy link
Copy Markdown
Member

@Kami Kami left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

I wonder if null string is a left over from previous version of their API or similar.

@Kami Kami merged commit f78db46 into apache:trunk May 2, 2021
@Kami
Copy link
Copy Markdown
Member

Kami commented May 2, 2021

I see update_record() does the same thing so I will update that code as well.

asfgit pushed a commit that referenced this pull request May 2, 2021
parameter in DigitalOcean DNS driver, add changelog entry for #1570.
d-mo pushed a commit to mistio/libcloud that referenced this pull request Nov 15, 2021
parameter in DigitalOcean DNS driver, add changelog entry for apache#1570.
d-mo pushed a commit to mistio/libcloud that referenced this pull request Nov 19, 2021
parameter in DigitalOcean DNS driver, add changelog entry for apache#1570.
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.01%. Comparing base (cc5987b) to head (7b88819).
⚠️ Report is 1778 commits behind head on trunk.

Additional details and impacted files
@@           Coverage Diff           @@
##            trunk    #1570   +/-   ##
=======================================
  Coverage   83.01%   83.01%           
=======================================
  Files         394      394           
  Lines       84990    84990           
  Branches     9038     9038           
=======================================
  Hits        70550    70550           
  Misses      11373    11373           
  Partials     3067     3067           
Files with missing lines Coverage Δ
libcloud/dns/drivers/digitalocean.py 92.59% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants