0

Search HumanUser by Email_id

 

status = sg.find("HumanUser",[["Email","is","some@gmail.com"]])

Error

Fault: API read() HumanUser.Email doesn't exist:

 

Anyone knows that how to search user by email_id

2件のコメント

  • 1
    Avatar
    Lee Hollingworth

    Use a lowercase 'e' for email. 

    status = sg.find("HumanUser",[["email","is","some@gmail.com"]])

    print status

    >> [{'type': 'HumanUser', 'id': 97}]

    To get a full list of fields on HumanUser try this:

    sorted(sg.schema_read()["HumanUser"].keys())
     

     

  • 1
    Avatar
    Tony Aiello

    sg.schema_read() pulls the entire db schema and thus might be a little slow (handfuls of seconds).  For just one entity, it's faster to:

    sorted(sg.schema_field_read('HumanUser')..keys()

ログインしてコメントを残してください。