TypeError :Объект 'Key' не вызывается

Я пытаюсь вызвать конкретную модель объекта в магазине приложений Google с помощью этого кода на питоне:

class Profile(BlogHandler):
    def get(self):
        user = users.get_current_user()

        if user:
            user = users.get_current_user()
            user_db_qry = User.query(User.theid == user.federated_identity())
            #theid is how I have saved each user's federated id in the User entity in the datastore
            user_db_list = user_db_qry.fetch(1)
            profile_user = user_db_list[0]
            profile_id = profile_user.key().id_or_name()
            #I am trying to get the datastore created ID/Name here and this is the line that gives me the error

            self.redirect('/profile/%s' % str(profile_id))
        else:
            self.redirect("/about")

Поэтому я не совсем уверен, что происходит не так. Мой запрос некорректен?

0
задан exployre 30 June 2012 в 03:34
поделиться