util.pubsub: Use service.node_defaults in case config.node_defaults was not provided (thanks jonasw)
authorMatthew Wild <mwild1@gmail.com>
Sat, 04 Aug 2018 21:30:10 +0100
changeset 9109 e70b9e8bc443
parent 9108 e735c9865f42
child 9110 6e42ef9c805c
util.pubsub: Use service.node_defaults in case config.node_defaults was not provided (thanks jonasw)
util/pubsub.lua
--- a/util/pubsub.lua	Sat Aug 04 15:44:38 2018 +0200
+++ b/util/pubsub.lua	Sat Aug 04 21:30:10 2018 +0100
@@ -114,7 +114,7 @@
 function service:get_default_affiliation(node, actor, action) -- luacheck: ignore 212
 	local node_obj = self.nodes[node];
 	local access_model = node_obj and node_obj.config.access_model
-		or self.config.node_defaults.access_model;
+		or self.node_defaults.access_model;
 
 	if access_model == "open" then
 		return "none";