grzegorznittner / StartupBidder

2 stars 0 forks source link

Appengine mock datastore listing profile_id field does not match owner's profile. #95

Closed johnarleyburns closed 12 years ago

johnarleyburns commented 13 years ago

Logged in as user insider@startupbidder.com. Then looked at his listing 'Micropayments'. This results in the json call:

http://localhost:7777/bids/listing/ag1zdGFydHVwYmlkZGVychoLEgdMaXN0aW5nIg1taWNyb3BheW1lbnRzDA/

In the response, the listing property has the field:

"profile_id":"ag1zdGFydHVwYmlkZGVychkLEgRVc2VyIg9idXNpbmVzc2luc2lkZXIM"

However the loggedin_profile property has the field:

"profile_id":"ag1zdGFydHVwYmlkZGVych4LEgRVc2VyIhQxODgxMzYxMDA5NDI1MjI0OTc1Nww","username":"insider@startupbidder.com"

Somehow, the insider@startupbidder.com user isn't getting linked properly to the bids, so I can't test bid acceptance.

Complete response:

{"login_url":null,"logout_url":"/_ah/logout?continue=http%3A%2F%2Flocalhost%3A7777",

"loggedin_profile"{"num":0,"profile_id":"ag1zdGFydHVwYmlkZGVych4LEgRVc2VyIhQxODgxMzYxMDA5NDI1MjI0OTc1Nww","username":"insider@startupbidder.com","name":"","email":"insider@startupbidder.com","open_id":null,"title":null,"organization":null,"facebook":null,"twitter":null,"linkedin":null,"investor":false,"joined_date":"20110918","last_login":"20110918","modified":"20110918","num_listings":0,"num_bids":0,"num_comments":0,"num_votes":0,"status":"active","votable":false},

"bids":[{"num":1,"bid_id":"ag1zdGFydHVwYmlkZGVychYLEgNCaWQiDTZfLTE2ODgxNzQ1MzYM","profile_id":"ag1zdGFydHVwYmlkZGVychQLEgRVc2VyIgpkcmFnb25zZGVuDA","profile_username":"The Dragon","listing_id":"ag1zdGFydHVwYmlkZGVychoLEgdMaXN0aW5nIg1taWNyb3BheW1lbnRzDA","listing_title":null,"bid_date":"20110918","amount":16000,"equity_pct":13,"bid_type":"syndicate","valuation":123076,"interest_rate":0,"status":"active"},{"num":2,"bid_id":"ag1zdGFydHVwYmlkZGVychYLEgNCaWQiDTVfLTE2ODgxNzQ1MzYM","profile_id":"ag1zdGFydHVwYmlkZGVychcLEgRVc2VyIg1jcmF6eWludmVzdG9yDA","profile_username":"MadMax","listing_id":"ag1zdGFydHVwYmlkZGVychoLEgdMaXN0aW5nIg1taWNyb3BheW1lbnRzDA","listing_title":null,"bid_date":"20110918","amount":30000,"equity_pct":14,"bid_type":"syndicate","valuation":214285,"interest_rate":0,"status":"active"},{"num":3,"bid_id":"ag1zdGFydHVwYmlkZGVychYLEgNCaWQiDTRfLTE2ODgxNzQ1MzYM","profile_id":"ag1zdGFydHVwYmlkZGVychQLEgRVc2VyIgpkcmFnb25zZGVuDA","profile_username":"The Dragon","listing_id":"ag1zdGFydHVwYmlkZGVychoLEgdMaXN0aW5nIg1taWNyb3BheW1lbnRzDA","listing_title":null,"bid_date":"20110918","amount":6000,"equity_pct":16,"bid_type":"syndicate","valuation":37500,"interest_rate":0,"status":"active"},{"num":4,"bid_id":"ag1zdGFydHVwYmlkZGVychYLEgNCaWQiDTNfLTE2ODgxNzQ1MzYM","profile_id":"ag1zdGFydHVwYmlkZGVychcLEgRVc2VyIg1jcmF6eWludmVzdG9yDA","profile_username":"MadMax","listing_id":"ag1zdGFydHVwYmlkZGVychoLEgdMaXN0aW5nIg1taWNyb3BheW1lbnRzDA","listing_title":null,"bid_date":"20110917","amount":54000,"equity_pct":38,"bid_type":"sole_investor","valuation":142105,"interest_rate":0,"status":"active"},{"num":5,"bid_id":"ag1zdGFydHVwYmlkZGVychYLEgNCaWQiDTJfLTE2ODgxNzQ1MzYM","profile_id":"ag1zdGFydHVwYmlkZGVychQLEgRVc2VyIgpkcmFnb25zZGVuDA","profile_username":"The Dragon","listing_id":"ag1zdGFydHVwYmlkZGVychoLEgdMaXN0aW5nIg1taWNyb3BheW1lbnRzDA","listing_title":null,"bid_date":"20110917","amount":28000,"equity_pct":40,"bid_type":"syndicate","valuation":70000,"interest_rate":0,"status":"active"},{"num":6,"bid_id":"ag1zdGFydHVwYmlkZGVychYLEgNCaWQiDTFfLTE2ODgxNzQ1MzYM","profile_id":"ag1zdGFydHVwYmlkZGVychQLEgRVc2VyIgpkcmFnb25zZGVuDA","profile_username":"The Dragon","listing_id":"ag1zdGFydHVwYmlkZGVychoLEgdMaXN0aW5nIg1taWNyb3BheW1lbnRzDA","listing_title":null,"bid_date":"20110917","amount":15000,"equity_pct":23,"bid_type":"sole_investor","valuation":65217,"interest_rate":0,"status":"active"}],

"listing":{"num":0,"listing_id":"ag1zdGFydHVwYmlkZGVychoLEgdMaXN0aW5nIg1taWNyb3BheW1lbnRzDA","title":"Micropayments","suggested_amt":2450,"suggested_pct":49,"suggested_val":5000,"median_valuation":22000,"listing_date":"20110917","closing_date":"20111017","status":"active","summary":"Micropayments are one idea that's tossed around to solve the problem of paying for content on the Web. If you want to read a New York Times story it would only cost a nickel! Or on Tumblr, if you want to tip a blogger or pay for a small design you could with ease. So far, these micropayment plans have not worked.","profile_id":"ag1zdGFydHVwYmlkZGVychkLEgRVc2VyIg9idXNpbmVzc2luc2lkZXIM","profile_username":"Insider","num_comments":15,"num_bids":6,"num_votes":2,"votable":true,"days_ago":0,"days_left":28,"business_plan_id":null,"presentation_id":null,"financials_id":null},"profile":null}

grzegorznittner commented 12 years ago

I was not able to verify exactly the same calls as I can't really log in as mock's insider user (how have you done this?). I compared ids returned by other API calls and today I got proper ids. Could you please verify it again.

johnarleyburns commented 12 years ago

After recreating mock data with latest updates, bids and members are now properly linked in the mock data.