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
7 class AdmQueryPerson(Method):
9 Deprecated. See GetPersons.
14 roles = ['admin', 'pi', 'user', 'tech']
18 {'email': Person.fields['email']}
21 returns = [Person.fields['person_id']]
23 def call(self, auth, search_vals):
24 if 'email' in search_vals:
25 persons = Persons(self.api, [search_vals['email']])
27 return [persons[0]['person_id']]