Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6029641
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T04:54:59+00:00 2026-05-23T04:54:59+00:00

Can not reproduce this error on local devserver (1.5.0) but when we deploy code

  • 0

Can not reproduce this error on local devserver (1.5.0) but when we deploy code to google, it starts popping up? Is it a bug in the current online version of GAE?

Here is the problem. If we first do this:

proj = Project(created_by=users.User(email='test@sample.com'))
proj.put()
user = users.get_current_user()
print user.email()  #this prints test@sample.com (actual email not used)

This fetches 0 results:

projs = Project.all().filter('created_by', user).fetch(500)

But this fetches the result that should actually be fetched:

projs = GqlQuery("SELECT * FROM Project where created_by = USER('%s')"%user.email()).fetch(500)

Any idea whats going on here?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T04:55:00+00:00Added an answer on May 23, 2026 at 4:55 am

    As i could see you are creating a user object and persisting that into created_by.
    i.e

    users.User(email='test@sample.com')
    

    here you are creating a users.User object with email ‘test@sample.com’. You are persisting the same into Projects’ created_by. Where as you are comparing that with users.get_current_user() which gets the current logged in user object.That’s why it’s not fetching any object. Whereas in gql you are again creating a User object with the passed email which obviously will match the persisted user object in project.

    i would say you should do something like this

    proj = Project()
    proj.created_by  = users.get_current_user()
    proj.put()
    user = users.get_current_user()
    Project().all().filter('created_by',user).get()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.