svn keywords
[plcapi.git] / PLC / Methods / AddAddressTypeToAddress.py
index 5f4d1c1..2278110 100644 (file)
@@ -1,3 +1,5 @@
+# $Id$
+# $URL$
 from PLC.Faults import *
 from PLC.Method import Method
 from PLC.Parameter import Parameter, Mixed
@@ -25,8 +27,6 @@ class AddAddressTypeToAddress(Method):
 
     returns = Parameter(int, '1 if successful')
 
-    event_type = 'AddTo'
-    object_type = 'Address'
 
     def call(self, auth, address_type_id_or_name, address_id):
        address_types = AddressTypes(self.api, [address_type_id_or_name])
@@ -44,6 +44,6 @@ class AddAddressTypeToAddress(Method):
                 raise PLCPermissionDenied, "Address must be associated with one of your sites"
 
         address.add_address_type(address_type)
-       self.object_ids = [address['address_id']]
+       self.event_objects = {'Address': [address['address_id']]}
 
         return 1