X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=PLC%2FMethods%2FUpdateAddress.py;h=2fdc1948df8c827c4b21e5bdabf2d5d45c6d71f5;hb=86f6412b46e53223d4160f9f575a58c3511a9b41;hp=c0687b6fb13841722d417b8291b98e62f5ce4e92;hpb=7e7751b60ad5379a11bb78e571bad3df9f5eb02f;p=plcapi.git diff --git a/PLC/Methods/UpdateAddress.py b/PLC/Methods/UpdateAddress.py index c0687b6..2fdc194 100644 --- a/PLC/Methods/UpdateAddress.py +++ b/PLC/Methods/UpdateAddress.py @@ -2,7 +2,7 @@ from PLC.Faults import * from PLC.Method import Method from PLC.Parameter import Parameter, Mixed from PLC.Addresses import Address, Addresses -from PLC.Auth import PasswordAuth +from PLC.Auth import Auth can_update = lambda (field, value): field in \ ['line1', 'line2', 'line3', @@ -23,7 +23,7 @@ class UpdateAddress(Method): address_fields = dict(filter(can_update, Address.fields.items())) accepts = [ - PasswordAuth(), + Auth(), Address.fields['address_id'], address_fields ] @@ -34,7 +34,7 @@ class UpdateAddress(Method): address_fields = dict(filter(can_update, address_fields.items())) # Get associated address details - addresses = Addresses(self.api, [address_id]).values() + addresses = Addresses(self.api, [address_id]) if not addresses: raise PLCInvalidArgument, "No such address" address = addresses[0]