X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=PLC%2FMethods%2FDeleteNode.py;h=a819b2483b0fafe17f7866ff358fe7c979ef2b92;hb=da06561d0f5240a5409474e16824e4e015f31fac;hp=bc92718ca6a22b56482ee321c210f61a452ea8ea;hpb=41063c2352286a103b95821293a961f219900f39;p=plcapi.git diff --git a/PLC/Methods/DeleteNode.py b/PLC/Methods/DeleteNode.py index bc92718..a819b24 100644 --- a/PLC/Methods/DeleteNode.py +++ b/PLC/Methods/DeleteNode.py @@ -43,10 +43,13 @@ class DeleteNode(Method): if node['site_id'] not in self.caller['site_ids']: raise PLCPermissionDenied, "Not allowed to delete nodes from specified site" + node_id=node['node_id'] + site_id=node['site_id'] node.delete() - # Logging variables - self.event_objects = {'Node': [node['node_id']]} - self.message = "Node %d deleted" % node['node_id'] + # Logging variables + # it's not much use to attach to the node as it's going to vanish... + self.event_objects = {'Node': [node_id], 'Site': [site_id] } + self.message = "Node %d deleted" % node['node_id'] return 1