def _pre_delete_hook(cls, key):
post_db = key.get()
vote_keys = post_db.get_vote_dbs(keys_only=True, limit=-1)[0]
comment_keys = post_db.get_comment_dbs(keys_only=True, limit=-1)[0]
ndb.delete_multi(vote_keys + comment_keys)
评论列表
文章目录