Functions charge_pending and get_scheduled used accepted_iter
decorator thing which obscured what they were doing. Removed unused
function get_scheduled_campaign.
The max_num property is used to calculate the width for the .rank
element so that listing items line up. This was getting overwritten by
Listing.listing(), causing the spotlight items to not line up with the
rest of the page.
trans_id > 0 is used to identify an authorize transaction in many places in the
code and trans_id < 0 is used to identify freebies, so for now the only
"special" code is 0
(Also fixes problem with mark_payment_error since ERROR wasn't in the Enum)
Now, if a campaign's start date has already passed, it will go live immediately
after approval instead of waiting until midnight the next day.
(It seems like this was already the intended behavior, but
make_daily_promotions() was having no effect because it only loads campaigns
that have already been charged.)
Fixes the following bug:
A user was unable to authorize campaign because clicking Pay raised
an exception.
Cause:
The user's record was missing from the authorize_account_id table. Our code
has some logic to parse the customer id from the authorize error response when
this happens and rewrite the record, but the regexp was out of date.
This change updates the regexp to match the current authorize.net error msg
format and logs some info to make it easier to catch the problem if the format
changes again in the future.
Note:
- Why would a user record be missing in the first place? Should be looked into.
Initial campiagn Thing writes were recording an enum value for freebie
campaigns but it actually is useful to include the transaction id (which is
negative for freebies) because it references the freebie's record in the
bid table.
Note: This commit also includes a one-off script for fixing the trans_id
in existing campaign things.
NOTE: if you're using an old-style install with symlinks to any of these
files, please make sure to copy them out of the repo before merging this
commit.
* Only add debug middleware to chain when debug is set.
* Remove source check middleware (just use an external validator).
* Make profiler return a profile object that can be examined with
external tools such as KCachegrind.