From: Pete Vander Giessen Date: Wed, 30 Nov 2016 13:11:24 +0000 (-0500) Subject: addUnits no longer attempts to send [None] for `placement`. X-Git-Tag: 0.1.0~25^2 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=9f92750dcbcfcd59367cf9ced122b45ae09f5d9b;p=osm%2FN2VC.git addUnits no longer attempts to send [None] for `placement`. This happens when we attempt to parse_placement on a null or blank directive, and it leads to a null pointer error in the API. Instead, we pass a simple None for `placement` if we don't have a placement directive. --- diff --git a/juju/application.py b/juju/application.py index 83c2275..74f9057 100644 --- a/juju/application.py +++ b/juju/application.py @@ -88,7 +88,7 @@ class Application(model.ModelEntity): result = await app_facade.AddUnits( application=self.name, - placement=[parse_placement(to)], + placement=[parse_placement(to)] if to else None, num_units=count, )