我正在尝试使用可能值列表查询 GAE 数据存储。就像是:
list_of_assigned_therapists = [ ... ]
qry = Appointment.query(Appointment.therapist in list_of_assigned_therapists)
Run Code Online (Sandbox Code Playgroud)
但我收到标题中的错误。我发现的唯一参考是使用模型中未声明的属性。但我的模型看起来像
class Appointment(BaseModel):
therapist = ndb.KeyProperty(MyUser, required = True)
Patient = ndb.KeyProperty(MyUser)
when = TZDateTimeProperty(required = True)
status = ndb.IntegerProperty(default = 1)
Run Code Online (Sandbox Code Playgroud)
和简单的查询
qry = Appointment.query(Appointment.therapist == selected_therapist_key)
Run Code Online (Sandbox Code Playgroud)
工作正常,没有任何错误。
我究竟做错了什么 ???