query = Query(CliqueVote)
print dir(query)
结果如下:
['__class__', '__delattr__', '__dict__', '__doc__', '__format__', '__getattribute__', '__hash__', '__init__', '__module__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_add_condition', '_and_query', '_extra', '_include', '_limit', '_new_object', '_or_query', '_order', '_process_result', '_query_class', '_quote', '_select', '_skip', '_where', 'add_ascending', 'add_descending', 'and_', 'ascending', 'contained_in', 'contains', 'contains_all', 'count', 'descending', 'do_cloud_query', 'does_not_exists', 'does_not_match_key_in_query', 'does_not_match_query', 'dump', 'endswith', 'equal_to', 'exists', 'find', 'first', 'get', 'greater_than', 'greater_than_or_equal_to', 'include', 'less_than', 'less_than_or_equal_to', 'limit', 'matched', 'matched_key_in_query', 'matches_key_in_query', 'matches_query', 'near', 'not_contained_in', 'not_equal_to', 'or_', 'select', 'skip', 'startswith', 'within_geo_box', 'within_kilometers', 'within_miles', 'within_radians']
其中并不包含文档中提及的destroy_all1方法。直接调用query.destroy_all()
也会报错。
Traceback (most recent call last):
File "/home/xmrg/share/provemewrongServer/env/local/lib/python2.7/site-packages/leancloud/engine/leanengine.py", line 106, in dispatch_request
result = dispatch_cloud_hook(**values)
File "/home/xmrg/share/provemewrongServer/env/local/lib/python2.7/site-packages/leancloud/engine/leanengine.py", line 212, in dispatch_cloud_hook
func(obj)
File "/home/xmrg/share/provemewrongServer/cloud.py", line 32, in before_clique_vote_save
query.destroy_all()
AttributeError: 'Query' object has no attribute 'destroy_all'
请问这是BUG吗
-
创建时间
16年2月20日
-
最后回复
16年2月22日
-
5
回复
-
2.0K
浏览
-
3
用户
-
2
链接