allow node and anonymous authentication
[plcapi.git] / PLC / Methods / DeletePCU.py
index 01382b1..0d7a09a 100644 (file)
@@ -22,6 +22,7 @@ class DeletePCU(Method):
 
     returns = Parameter(int, '1 if successful')
 
+
     def call(self, auth, pcu_id):
         # Get associated PCU details
         pcus = PCUs(self.api, [pcu_id])
@@ -34,5 +35,9 @@ class DeletePCU(Method):
                 raise PLCPermissionDenied, "Not allowed to update that PCU"
 
         pcu.delete()
+       
+       # Logging variables
+       self.object_ids = [pcu['pcu_id']]
+       self.message = 'PCU %d deleted' % pcu['pcu_id']
 
         return 1