WebUI: Fix invalid RPC calls when link widget has no pkey passed

Fixes: https://pagure.io/freeipa/issue/8338
Reviewed-By: Alexander Bokovoy <abbra@users.noreply.github.com>
This commit is contained in:
Peter Keresztes Schmidt
2020-05-30 18:32:34 +02:00
committed by Florence Blanc-Renaud
parent ad8e0af077
commit 7de1a93ce4

View File

@@ -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) {