We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This is consistent with query.first.
query.first
Thank artsungames for bringing this to our attention.
The text was updated successfully, but these errors were encountered:
object_id 在云存储中不存在的时候,会返回一个本地构造的 object,可以通过 created_at 是否被设置来察觉到。 当前我们自己的项目里做了这样的 patch:
from leancloud import Query as OriginalQuery class Query(OriginalQuery): def get(self, object_id): obj = super().get(object_id) # 此处也可以 raise 101,大家可以按自己的习惯来 return obj if getattr(obj, "created_at", None) else None def patch_leancloud(): import leancloud leancloud.Query = Query
Sorry, something went wrong.
可以通过 crerated_at 是否被设置来察觉到
是的,其实 SDK 提供了一个 is_existed 方法(这个方法在实现上也是检查 created_at)
is_existed
created_at
No branches or pull requests
This is consistent with
query.first
.Thank artsungames for bringing this to our attention.
The text was updated successfully, but these errors were encountered: