From 9bd13dce1e84561bc9d4bd04513199def2e88b3f Mon Sep 17 00:00:00 2001 From: Blake Harnden <32446120+bharnden@users.noreply.github.com> Date: Thu, 16 Apr 2020 09:19:50 -0700 Subject: [PATCH] updates to allow setting 0 services for a node, but old gui does not send data in a way that can be compatible --- daemon/core/emulator/emudata.py | 2 +- daemon/core/services/coreservices.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/daemon/core/emulator/emudata.py b/daemon/core/emulator/emudata.py index 6a0ec8a6..a5e9bfff 100644 --- a/daemon/core/emulator/emudata.py +++ b/daemon/core/emulator/emudata.py @@ -74,7 +74,7 @@ class NodeOptions: self.canvas = None self.icon = None self.opaque = None - self.services = [] + self.services = None self.config_services = [] self.x = None self.y = None diff --git a/daemon/core/services/coreservices.py b/daemon/core/services/coreservices.py index 827982d2..f5a46c08 100644 --- a/daemon/core/services/coreservices.py +++ b/daemon/core/services/coreservices.py @@ -404,12 +404,11 @@ class CoreServices: :param services: names of services to add to node :return: nothing """ - if not services: + if services is None: logging.info( "using default services for node(%s) type(%s)", node.name, node_type ) services = self.default_services.get(node_type, []) - logging.info("setting services for node(%s): %s", node.name, services) for service_name in services: service = self.get_service(node.id, service_name, default_service=True)