changeset 8319 | 8648cb171213 |
parent 8315 | 6fd36e73082b |
child 8329 | 12408867bc86 |
--- a/util/pubsub.lua Mon Oct 09 13:45:53 2017 +0200 +++ b/util/pubsub.lua Tue Oct 10 01:41:47 2017 +0200 @@ -338,7 +338,11 @@ return false, "item-not-found"; end if id then -- Restrict results to a single specific item - return true, { id, [id] = self.data[node]:get(id) }; + local with_id = self.data[node]:get(id); + if not with_id then + return false, "item-not-found"; + end + return true, { id, [id] = with_id }; else local data = {} for key, value in self.data[node]:items() do