Skip to content

Commit

Permalink
fixes issue caused by the lack of a config collection in a fresh inst…
Browse files Browse the repository at this point in the history
…allation (#526)
  • Loading branch information
bilthon authored May 16, 2024
1 parent ccc909e commit 87318ac
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion jobs/node_info.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ const { logger } = require('../logger');

const info = async bot => {
try {
const config = await Config.findOne({});
let config = await Config.findOne({});
if (!config) {
config = new Config();
}
const info = await getInfo();
if (info.is_synced_to_chain) {
config.node_status = 'up';
Expand Down

0 comments on commit 87318ac

Please sign in to comment.