From 7b88819b2c75a7abe029eda119e77b086cdde9e0 Mon Sep 17 00:00:00 2001 From: Gasper Vozel Date: Wed, 17 Mar 2021 07:57:08 +0100 Subject: [PATCH] Fix null value in DigitalOcean create record 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 --- libcloud/dns/drivers/digitalocean.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libcloud/dns/drivers/digitalocean.py b/libcloud/dns/drivers/digitalocean.py index e393b05ad7..08f413bb38 100644 --- a/libcloud/dns/drivers/digitalocean.py +++ b/libcloud/dns/drivers/digitalocean.py @@ -171,15 +171,15 @@ def create_record(self, name, zone, type, data, extra=None): try: params['priority'] = extra['priority'] except KeyError: - params['priority'] = 'null' + params['priority'] = None try: params['port'] = extra['port'] except KeyError: - params['port'] = 'null' + params['port'] = None try: params['weight'] = extra['weight'] except KeyError: - params['weight'] = 'null' + params['weight'] = None if 'ttl' in extra: params['ttl'] = extra['ttl']