X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=PLC%2FMethods%2FUpdateSliceAttributeType.py;h=145a51da7609c4f63ac028205bfab6d3f4e3f03a;hb=362b137903f44329029ebe2e29c4e70680ab8163;hp=df3224cf06162ade79fffbb6fc0320e5ac7f8256;hpb=1f8c38dd1357c93e4be8d94456b7274a591d2db4;p=plcapi.git diff --git a/PLC/Methods/UpdateSliceAttributeType.py b/PLC/Methods/UpdateSliceAttributeType.py index df3224c..145a51d 100644 --- a/PLC/Methods/UpdateSliceAttributeType.py +++ b/PLC/Methods/UpdateSliceAttributeType.py @@ -31,12 +31,13 @@ class UpdateSliceAttributeType(Method): def call(self, auth, attribute_type_id_or_name, attribute_type_fields): attribute_type_fields = dict(filter(can_update, attribute_type_fields.items())) - attribute_types = SliceAttributeTypes(self.api, [attribute_type_id_or_name]).values() + attribute_types = SliceAttributeTypes(self.api, [attribute_type_id_or_name]) if not attribute_types: raise PLCInvalidArgument, "No such attribute" attribute_type = attribute_types[0] attribute_type.update(attribute_type_fields) attribute_type.sync() + self.event_objects = {'AttributeType': [attribute_type['attribute_type_id']]} return 1