Update Person HRN when Person's email is updated
[plcapi.git] / PLC / Methods / UpdatePCU.py
index 99415f2..fb17176 100644 (file)
@@ -43,7 +43,11 @@ class UpdatePCU(Method):
                 raise PLCPermissionDenied, "Not allowed to update that PCU"
 
         pcu.update(pcu_fields)
+        pcu.update_last_updated(commit=False)
         pcu.sync()
-       self.object_ids = [pcu['pcu_id']]
 
+        # Logging variables
+        self.event_objects = {'PCU': [pcu['pcu_id']]}
+        self.message = 'PCU %d updated: %s' % \
+                (pcu['pcu_id'], ", ".join(pcu_fields.keys()))
         return 1