Skip to content

Commit

Permalink
Test: check if category empty before setting a value
Browse files Browse the repository at this point in the history
  • Loading branch information
satrun77 committed May 22, 2016
1 parent 759a3c7 commit 0a5dc99
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Command/CreateCardCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
$card->setMetaKeywords($input->getArgument('keywords'));
$card->setMetaDescription($input->getArgument('description'));
$card->setViews(0);
if (!$input->isInteractive()) {
if (!$input->isInteractive() || !$card->getCategory()) {
$card->setCategory(
$this->getRepository('category')->find($input->getArgument('category'))
);
Expand Down

0 comments on commit 0a5dc99

Please sign in to comment.