logs changes in the xrefs as well
[plcapi.git] / PLC / Methods / AddPCU.py
index 167f3f2..2d5b034 100644 (file)
@@ -34,8 +34,6 @@ class AddPCU(Method):
 
     returns = Parameter(int, 'New pcu_id (> 0) if successful')
     
-    event_type = 'Add'
-    object_type = 'PCU'
 
     def call(self, auth, site_id_or_login_base, pcu_fields):
         pcu_fields = dict(filter(can_update, pcu_fields.items()))
@@ -54,6 +52,9 @@ class AddPCU(Method):
         pcu['site_id'] = site['site_id']
         pcu.sync()
 
+       # Logging variables
        self.object_ids = [site['site_id'], pcu['pcu_id']]
+       self.message = 'PCU %d added site %s' % \
+               (pcu['pcu_id'], site['site_id'])
 
         return pcu['pcu_id']