Removed useless database query

This commit is contained in:
Ponkhy 2021-08-28 21:29:24 +02:00
parent 303adbf9b1
commit 858affa808
1 changed files with 1 additions and 5 deletions

View File

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