From 858affa8089f5e0da98be8aa80538b55d2eafe4f Mon Sep 17 00:00:00 2001 From: Ponkhy Date: Sat, 28 Aug 2021 21:29:24 +0200 Subject: [PATCH] Removed useless database query --- server/model/monitor.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/server/model/monitor.js b/server/model/monitor.js index a01dd6142..6d0d812bd 100644 --- a/server/model/monitor.js +++ b/server/model/monitor.js @@ -208,11 +208,7 @@ class Monitor extends BeanModel { dnsMessage = dnsMessage.slice(0, -2) } - let dnsLastResult = await R.findOne("monitor", "id = ?", [ - this.id, - ]); - - if (dnsLastResult.dnsLastResult !== dnsMessage) { + if (this.dnsLastResult !== dnsMessage) { R.exec("UPDATE `monitor` SET dns_last_result = ? WHERE id = ? ", [ dnsMessage, this.id