projects
/
pve-common.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
a24d91e
)
get_options: allow no arguments if all are optional
author
Thomas Lamprecht
<t.lamprecht@proxmox.com>
Mon, 7 Sep 2020 07:59:01 +0000
(09:59 +0200)
committer
Thomas Lamprecht
<t.lamprecht@proxmox.com>
Mon, 7 Sep 2020 07:59:07 +0000
(09:59 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/PVE/JSONSchema.pm
patch
|
blob
|
blame
|
history
diff --git
a/src/PVE/JSONSchema.pm
b/src/PVE/JSONSchema.pm
index 2ceb1bd7aaac47019d1929a98706d487ab86ce46..e8d7395a858619a13668d5a570671f57198803a7 100644
(file)
--- a/
src/PVE/JSONSchema.pm
+++ b/
src/PVE/JSONSchema.pm
@@
-1644,7
+1644,7
@@
sub get_options {
foreach my $arg_name (@$arg_param) {
if ($arg_name eq 'extra-args') {
$opts->{'extra-args'} = [];
- } els
e
{
+ } els
if (!$schema->{properties}->{$arg_name}->{optional})
{
raise("not enough arguments\n", code => HTTP_BAD_REQUEST);
}
}