Add timestamps to Nodes, PCUs and Interfaces to make concrete
[plcapi.git] / PLC / Methods / UpdatePCU.py
index d92d799..039400b 100644 (file)
@@ -1,4 +1,5 @@
 # $Id$
+# $URL$
 from PLC.Faults import *
 from PLC.Method import Method
 from PLC.Parameter import Parameter, Mixed
@@ -44,10 +45,11 @@ class UpdatePCU(Method):
                 raise PLCPermissionDenied, "Not allowed to update that PCU"
 
         pcu.update(pcu_fields)
+        pcu.update_last_updated(commit=False)
         pcu.sync()
-       
-       # Logging variables
-       self.event_objects = {'PCU': [pcu['pcu_id']]}
-       self.message = 'PCU %d updated: %s' % \
-               (pcu['pcu_id'], ", ".join(pcu_fields.keys()))
+
+        # Logging variables
+        self.event_objects = {'PCU': [pcu['pcu_id']]}
+        self.message = 'PCU %d updated: %s' % \
+                (pcu['pcu_id'], ", ".join(pcu_fields.keys()))
         return 1