OSDN Git Service

Model::Stories: check introtext exists in create method
authorhylom <hylom@users.sourceforge.jp>
Thu, 19 Jan 2017 12:29:15 +0000 (21:29 +0900)
committerhylom <hylom@users.sourceforge.jp>
Thu, 19 Jan 2017 12:29:15 +0000 (21:29 +0900)
src/newslash_web/lib/Newslash/Model/Stories.pm

index ea23f27..92f9353 100644 (file)
@@ -290,7 +290,7 @@ sub create {
     # check parameters
     my $msg = "";
     $msg = "no title" if !$params->{title};
-    $msg = "no title" if !$params->{title};
+    $msg = "no introtext" if !$params->{introtext};
     $msg = "no uid" if !$params->{uid};
     $msg = "no topics" if !defined $params->{topics_chosen};