X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=PLC%2FMethods%2FUpdatePCU.py;h=fb17176e1aa0de225a55d0cd1c6d937a38cb90a5;hb=465305e5d5738d3fde3121a8d92d31db6c77871b;hp=d92d799f737c08562198be22fb53421718091ae8;hpb=77e4f177dfee85705c36298c3230b2e4a3e73467;p=plcapi.git diff --git a/PLC/Methods/UpdatePCU.py b/PLC/Methods/UpdatePCU.py index d92d799..fb17176 100644 --- a/PLC/Methods/UpdatePCU.py +++ b/PLC/Methods/UpdatePCU.py @@ -1,4 +1,3 @@ -# $Id$ from PLC.Faults import * from PLC.Method import Method from PLC.Parameter import Parameter, Mixed @@ -44,10 +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() - - # 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