]> git.proxmox.com Git - pve-common.git/commitdiff
api: fix rendering of filepath/string parameters
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Mon, 15 May 2017 07:31:07 +0000 (09:31 +0200)
committerFabian Grünbichler <f.gruenbichler@proxmox.com>
Fri, 1 Sep 2017 11:45:41 +0000 (13:45 +0200)
25d9bda94127b1a91181cd80bb9948093dea389b broke this check,
but it is a better idea to check against the actual type
rather then the rendered type text anyway.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
src/PVE/RESTHandler.pm

index 961b2532c085fee7972d149d34aa21e34658d270..119e26ee3556eecb910a67afff79821560b0099b 100644 (file)
@@ -415,7 +415,7 @@ my $get_property_description = sub {
        $type = '';
     }
 
-    if ($fileparams && $type eq 'string') {
+    if ($fileparams && $phash->{type} eq 'string') {
        foreach my $elem (@$fileparams) {
            if ($name eq $elem) {
                $type = '<filepath>';