grzegorznittner/StartupBidder — Issue #153: Bid rejection api not working
Author: johnarleyburns
Created: 2011-10-21 21:28:27+00:00
State: open

Steps to reproduce:

1. Login with user dragon@startupbidder.com
2. Navigate to listing "Local news sites" bids page
3. Click "reject bid"

Expected result:

* bid is now in rejected status

Actual result:

* http 500 is thrown

Details:

The same test works fine with 'accept bid' which calls the /bid/accept api. However the reject bid, which calls the bid/reject api:

POST http://localhost:7777/bid/reject/?id=ag1zdGFydHVwYmlkZGVychcLEgNCaWQiDjEyXy0xMjkzMzQ3ODE1DA
=> 500 Internal Server Error

The server console says this is due to the bid not being in "active" status, even though it is in active status as confirmed by the "status: active" return in the bid results:

[java] 21.10.2011 21:23:30 com.startupbidder.dao.AppEngineDatastoreDAO rejectBid
[java] SEVERE: User 'ag1zdGFydHVwYmlkZGVychQLEgRVc2VyIgpkcmFnb25zZGVuDA' is
trying to reject bid 'BidDTO [user=ag1zdGFydHVwYmlkZGVychcLEgRVc2VyIg1jcmF6eWlu
dmVzdG9yDA, listing=ag1zdGFydHVwYmlkZGVychsLEgdMaXN0aW5nIg5sb2NhbG5ld3NzaXRlcww,
listingOwner=ag1zdGFydHVwYmlkZGVychQLEgRVc2VyIgpkcmFnb25zZGVuDA, placed=Wed Oct
19 22:08:15 UTC 2011, value=62000, percentOfCompany=57, valuation=108771, fundT
ype=COMMON, status=ACTIVE, comment=null]' which is not POSTED or ACTIVE!
[java] 21.10.2011 21:23:30 com.startupbidder.web.FrontController service
[java] SEVERE: Returned object is NULL