fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)
fu ([personal profile] fu) wrote in [site community profile] changelog2011-03-01 06:45 am

[dw-free] Crossposts don't delete

[commit: http://hg.dwscoalition.org/dw-free/rev/0c3f9b7f8c34]

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

Don't check for a valid entry on delete (only when editing or crossposting).

Patch by [personal profile] allen.

Files modified:
  • cgi-bin/DW/Worker/XPostWorker.pm
--------------------------------------------------------------------------------
diff -r e611a6c5f796 -r 0c3f9b7f8c34 cgi-bin/DW/Worker/XPostWorker.pm
--- a/cgi-bin/DW/Worker/XPostWorker.pm	Mon Feb 28 22:27:04 2011 +0800
+++ b/cgi-bin/DW/Worker/XPostWorker.pm	Tue Mar 01 14:45:13 2011 +0800
@@ -66,7 +66,7 @@ sub work {
     return $job->failed("Unable to load account $acctid for uid $uid") unless defined $acct;
 
     my $entry = LJ::Entry->new($u, ditemid => $ditemid);
-    return $job->failed("Unable to load entry $ditemid for uid $uid") unless defined $entry && $entry->valid;
+    return $job->failed("Unable to load entry $ditemid for uid $uid") unless defined $entry && ( $delete || $entry->valid );
 
     my %auth;
     if ($auth_response) {
--------------------------------------------------------------------------------