fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)
fu ([personal profile] fu) wrote in [site community profile] changelog2010-08-05 03:54 pm

[dw-free] some users can't make payments

[commit: http://hg.dwscoalition.org/dw-free/rev/19537d7ee2cd]

http://bugs.dwscoalition.org/show_bug.cgi?id=2940

Allow account conversion for free users (users with no current paid status).

Patch by [personal profile] fu.

Files modified:
  • cgi-bin/DW/Shop/Item/Account.pm
--------------------------------------------------------------------------------
diff -r 92554f49bfcf -r 19537d7ee2cd cgi-bin/DW/Shop/Item/Account.pm
--- a/cgi-bin/DW/Shop/Item/Account.pm	Tue Aug 03 14:34:05 2010 +0800
+++ b/cgi-bin/DW/Shop/Item/Account.pm	Thu Aug 05 23:54:38 2010 +0800
@@ -295,7 +295,10 @@ sub allow_account_conversion {
     # no existing user; assume no previous conflicting account
     return 1 unless LJ::isu( $u );
 
+    # no previous paid status; assume no conflicts
     my $paid_status = DW::Pay::get_paid_status( $u );
+    return 1 unless $paid_status;
+
     my $from = DW::Pay::type_shortname( $paid_status->{typeid} );
 
     # doesn't match premium => paid, so allow it
--------------------------------------------------------------------------------