(*) slice atttribute types get cached
[plcapi.git] / PLC / Methods / DeletePCU.py
index 4b50a3f..50adb88 100644 (file)
@@ -22,9 +22,12 @@ class DeletePCU(Method):
 
     returns = Parameter(int, '1 if successful')
 
+    event_type = 'Delete'
+    object_type = 'PCU'
+
     def call(self, auth, pcu_id):
         # Get associated PCU details
-        pcus = PCUs(self.api, [pcu_id]).values()
+        pcus = PCUs(self.api, [pcu_id])
         if not pcus:
             raise PLCInvalidArgument, "No such PCU"
         pcu = pcus[0]
@@ -34,5 +37,6 @@ class DeletePCU(Method):
                 raise PLCPermissionDenied, "Not allowed to update that PCU"
 
         pcu.delete()
+       self.object_ids = [pcu['pcu_id']]
 
         return 1