fix bug add face with staff_id

This commit is contained in:
2022-04-04 10:48:20 +07:00
parent 3fd18b0d95
commit ce6bcfabba
2 changed files with 3 additions and 3 deletions

View File

@@ -24,7 +24,7 @@ function _form(e) {
$("input[name='CaptureLogsID']").val($(e).attr("data-id"));
$("#FaceImage").attr("src", $(e).attr("data-img"));
var confidence = JSON.parse($(e).attr("data-confidence"));
$("#closest-img").attr("src", confidence.img);
$("#closest-img").attr("src", confidence.img != "" ? confidence.img : "/images/user2-160x160.jpg");
$("#closest-name").html(confidence.name + " [" + confidence.score + "]");
}