[pve-devel] [PATCH manager] check for array in disallowednodes filter

Thomas Lamprecht t.lamprecht at proxmox.com
Wed Nov 23 09:47:04 CET 2016


On 11/21/2016 04:46 PM, Dominik Csapak wrote:
> extjs throws an error if disallowednodes is not an array,
> so we need to check this
>
> Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
> ---
>   www/manager6/form/NodeSelector.js | 6 +++++-
>   1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/www/manager6/form/NodeSelector.js b/www/manager6/form/NodeSelector.js
> index fcb9cb1..56f6e5d 100644
> --- a/www/manager6/form/NodeSelector.js
> +++ b/www/manager6/form/NodeSelector.js
> @@ -104,7 +104,11 @@ Ext.define('PVE.form.NodeSelector', {
>   	// filter out disallowed nodes
>   	me.getStore().addFilter(new Ext.util.Filter({
>   	    filterFn: function(item) {
> -		return !Ext.Array.contains(me.disallowedNodes, item.data.node);
> +		if (Ext.isArray(me.disallowedNodes)) {
> +		    return !Ext.Array.contains(me.disallowedNodes, item.data.node);
> +		} else {
> +		    return true;
> +		}
>   	    }
>   	}));
>   

Tested-by: Thomas Lamprecht <t.lamprecht at proxmox.com>




More information about the pve-devel mailing list