From 2af2373c57c6828db922008ce1e3b7fd9b3e0da8 Mon Sep 17 00:00:00 2001 From: Peter Keresztes Schmidt Date: Jun 03 2020 16:36:11 +0000 Subject: WebUI: Fix invalid RPC calls when link widget has no pkey passed Fixes: https://pagure.io/freeipa/issue/8338 Reviewed-By: Alexander Bokovoy --- diff --git a/install/ui/src/freeipa/widget.js b/install/ui/src/freeipa/widget.js index dd5e66a..e737259 100644 --- a/install/ui/src/freeipa/widget.js +++ b/install/ui/src/freeipa/widget.js @@ -5194,10 +5194,17 @@ IPA.link_widget = function(spec) { if (that.no_check) return; + var pkeys = that.other_pkeys(); + + if (pkeys.length === 0) { + that.is_link = false; + return; + } + rpc.command({ entity: that.other_entity.name, method: 'show', - args: that.other_pkeys(), + args: pkeys, options: {}, retry: false, on_success: function(data) {