1 from PLC.Faults import *
2 from PLC.Method import Method
3 from PLC.Parameter import Parameter, Mixed
4 from PLC.Persons import Person, Persons
5 from PLC.Auth import Auth
6 from PLC.Methods.AddPerson import AddPerson
8 can_update = lambda (field, value): field in \
9 ['title', 'email', 'password', 'phone', 'url', 'bio']
11 class AdmAddPerson(AddPerson):
13 Deprecated. See AddPerson.
18 person_fields = dict(filter(can_update, Person.fields.items()))
22 Person.fields['first_name'],
23 Person.fields['last_name'],
27 def call(self, auth, first_name, last_name, person_fields = {}):
28 person_fields['first_name'] = first_name
29 person_fields['last_name'] = last_name
30 return AddPerson.call(self, auth, person_fields)