From: Radek Czajka Date: Fri, 23 Sep 2022 13:47:57 +0000 (+0200) Subject: fix X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/94e92455b60f276f2a1a5b55de5e6b060687f396?ds=inline fix --- diff --git a/src/catalogue/static/catalogue/wikidata_admin.js b/src/catalogue/static/catalogue/wikidata_admin.js index 2ba5a1c9..a8aa51ee 100644 --- a/src/catalogue/static/catalogue/wikidata_admin.js +++ b/src/catalogue/static/catalogue/wikidata_admin.js @@ -8,6 +8,7 @@ $(".wikidata-hint").remove(); $wdinput = $(this); let qid = $wdinput.val(); + if (!qid) return; $wdinput.addClass('wikidata-processing'); $.ajax( '/catalogue/wikidata/' + model + '/' + qid, @@ -39,6 +40,8 @@ } }; + }, + complete: function() { $wdinput.removeClass('wikidata-processing'); }, }