From 9f92750dcbcfcd59367cf9ced122b45ae09f5d9b Mon Sep 17 00:00:00 2001 From: Pete Vander Giessen Date: Wed, 30 Nov 2016 08:11:24 -0500 Subject: [PATCH] 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. --- juju/application.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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, ) -- 2.25.1