reddit relies on pycassa/pycassa@91a5887def
but at time of writing there still isn't a release that contains this
patch. Until that's available, we'll add a custom download link.
- Escapes &, <, and > except in extraOptions tags, which need to allow special
characters
- Encodes string as UTF-8 before sending it over the wire
- Replaces xml entities in responses with the correct chars
This change should fix some of the 500 server errors people were getting when
they had unusual characters in their payment info.
Someone has been sending Comment fullnames to POST_hide and that
results in an error on our side and a 500 for them. They really
should be getting a proper error message back instead.
Doing a SELECT on the data table to determine which keys already
exist was adding too much extra load to the Account master. This
attempts to alleviate that by optimistically trying an UPDATE and
if no rows were actually changed by the UPDATE, doing an INSERT
instead.
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.