diff options
author | BonfaceKilz | 2022-05-19 12:58:59 +0300 |
---|---|---|
committer | BonfaceKilz | 2022-05-27 15:17:52 +0300 |
commit | 76e9c025143f451cb24821b99ff1d37189ea004c (patch) | |
tree | 43cf7ce58d929ae01a30fee27b6258baca34b430 | |
parent | b5494aadd60250fc7bdb4e474bc06cc5f6cd29e0 (diff) | |
download | genenetwork2-76e9c025143f451cb24821b99ff1d37189ea004c.tar.gz |
POST deletions
-rw-r--r-- | wqflask/wqflask/templates/case_attributes.html | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/wqflask/wqflask/templates/case_attributes.html b/wqflask/wqflask/templates/case_attributes.html index c2db7ef8..9ed02ed4 100644 --- a/wqflask/wqflask/templates/case_attributes.html +++ b/wqflask/wqflask/templates/case_attributes.html @@ -283,19 +283,21 @@ let node = $(this).parents("tr") let diff = {}; + let nodeId = $(this).parents("tr").data("id"); diff["Deletion"] = { name: node.find(".name").data("original-value"), description: node.find(".description").data("original-value"), id: node.data("id")} console.log(diff) - $.ajax({ - type: "POST", - data: {"data": JSON.stringify(diff)}, - url: '{{ url_for("metadata_edit.update_case_attributes") }}', - success: function(data, status, xhr) { - location.reload(); - } - }); + if (nodeId){ + $.ajax({ + type: "POST", + data: {"data": JSON.stringify(diff)}, + url: '{{ url_for("metadata_edit.update_case_attributes") }}', + success: function(data, status, xhr) { + location.reload(); + } + })} }); }); </script> |