Skip to content

Commit

Permalink
🐛 allow jobs without models
Browse files Browse the repository at this point in the history
Signed-off-by: bnomei <[email protected]>
  • Loading branch information
bnomei committed Dec 5, 2022
1 parent bb18c69 commit a1e5e04
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 29 deletions.
3 changes: 3 additions & 0 deletions classes/Janitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,9 @@ public static function resolveQueriesInCommand(array $args): array
{
$modelKey = array_search('--model', $args);
$model = $modelKey !== false && $modelKey + 1 < count($args) ? $args[$modelKey + 1] : null;
if (!$model) {
return $args;
}
$model = Janitor::resolveModel($model);

$args = array_map(function($value) use ($model) {
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "bnomei/kirby3-janitor",
"type": "kirby-plugin",
"version": "3.2.0",
"version": "3.2.1",
"license": "MIT",
"description": "Kirby 3 Plugin for running commands like cleaning the cache from within the Panel, PHP code or a cronjob",
"authors": [
Expand Down
51 changes: 27 additions & 24 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions vendor/composer/installed.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php return array(
'root' => array(
'name' => 'bnomei/kirby3-janitor',
'pretty_version' => '3.2.0',
'version' => '3.2.0.0',
'pretty_version' => '3.2.1',
'version' => '3.2.1.0',
'reference' => NULL,
'type' => 'kirby-plugin',
'install_path' => __DIR__ . '/../../',
Expand All @@ -11,8 +11,8 @@
),
'versions' => array(
'bnomei/kirby3-janitor' => array(
'pretty_version' => '3.2.0',
'version' => '3.2.0.0',
'pretty_version' => '3.2.1',
'version' => '3.2.1.0',
'reference' => NULL,
'type' => 'kirby-plugin',
'install_path' => __DIR__ . '/../../',
Expand Down

0 comments on commit a1e5e04

Please sign in to comment.