git://git.onelab.eu
/
plcapi.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
retrieve tag_type needed for caller_may_write_tag
[plcapi.git]
/
PLC
/
Methods
/
UpdatePCU.py
diff --git
a/PLC/Methods/UpdatePCU.py
b/PLC/Methods/UpdatePCU.py
index
99415f2
..
039400b
100644
(file)
--- a/
PLC/Methods/UpdatePCU.py
+++ b/
PLC/Methods/UpdatePCU.py
@@
-1,3
+1,5
@@
+# $Id$
+# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
@@
-43,7
+45,11
@@
class UpdatePCU(Method):
raise PLCPermissionDenied, "Not allowed to update that PCU"
pcu.update(pcu_fields)
raise PLCPermissionDenied, "Not allowed to update that PCU"
pcu.update(pcu_fields)
+ pcu.update_last_updated(commit=False)
pcu.sync()
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
return 1