OSDN Git Service

Model::Stories: not to set 'neverdisplay' parameter if not parameter given
[newslash/newslash.git] / src / newslash_web / lib / Newslash / Web / Controller / API / Story.pm
index 87a63c1..7f68440 100644 (file)
@@ -193,7 +193,9 @@ sub post {
     }
 
     $params->{commentstatus} = $item->{commentstatus} || $item->{comment_status} || "enabled";
-    $params->{neverdisplay} = $item->{display} ? 0 : 1;
+    if (!$item->{display}) {
+       $params->{neverdisplay} = 1;
+    }
 
     $params->{action} = $data->{action} || 'preview';