diff --git a/cloudkittyclient/v1/rating/hashmap.py b/cloudkittyclient/v1/rating/hashmap.py index 85c02ca..ba56dc2 100644 --- a/cloudkittyclient/v1/rating/hashmap.py +++ b/cloudkittyclient/v1/rating/hashmap.py @@ -172,7 +172,7 @@ class HashmapManager(base.BaseManager): :param value: Value of the mapping :type value: str """ - if not kwargs.get('cost'): + if kwargs.get('cost') is None: raise exc.ArgumentRequired("'cost' argument is required") if not kwargs.get('value'): if not kwargs.get('service_id'): diff --git a/releasenotes/notes/fix-zero-cost-mapping-7a4247cf1c6815f8.yaml b/releasenotes/notes/fix-zero-cost-mapping-7a4247cf1c6815f8.yaml new file mode 100644 index 0000000..c73d1a5 --- /dev/null +++ b/releasenotes/notes/fix-zero-cost-mapping-7a4247cf1c6815f8.yaml @@ -0,0 +1,4 @@ +--- +fixes: + - | + Fixes creation of hashmap mappings with a zero cost.