def _pre_delete_hook(cls, key): language_db = key.get() post_keys = language_db.get_post_dbs(keys_only=True, limit=-1)[0] ndb.delete_multi(post_keys)