Skip to content

Commit

Permalink
GithubFiles: added UNTYPE detection
Browse files Browse the repository at this point in the history
  • Loading branch information
f3l1x committed Jan 13, 2016
1 parent 6cc2217 commit e314b21
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/model/tasks/addons/UpdateGithubFilesTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
use App\Model\ORM\Addon\Addon;
use App\Model\ORM\Addon\AddonRepository;
use App\Model\WebServices\Github\Service;
use Nette\Utils\DateTime;
use Nextras\Orm\Collection\ICollection;

final class UpdateGithubFilesTask extends BaseAddonTask
Expand Down Expand Up @@ -110,6 +109,11 @@ public function run(array $args = [])
}
}

// Untype
if (in_array($addon->type, [NULL, Addon::TYPE_UNKNOWN])) {
$addon->type = Addon::TYPE_UNTYPE;
}

// Persist
$this->addonRepository->persistAndFlush($addon);

Expand Down

0 comments on commit e314b21

Please sign in to comment.