- merge from HEAD
[plcapi.git] / PLC / Methods / UpdateSlice.py
index 5ac3abc..2596c74 100644 (file)
@@ -47,6 +47,9 @@ class UpdateSlice(Method):
             raise PLCInvalidArgument, "No such slice"
         slice = slices[0]
 
+        if slice['peer_id'] is not None:
+            raise PLCInvalidArgument, "Not a local slice"
+
         if 'admin' not in self.caller['roles']:
             if self.caller['person_id'] in slice['person_ids']:
                 pass
@@ -84,5 +87,6 @@ class UpdateSlice(Method):
             raise PLCInvalidArgument, "Cannot renew a slice with an empty description or URL"
 
         slice.sync()
+       self.event_objects = {'Slice': [slice['slice_id']]}
 
         return 1