Skip to content

Commit

Permalink
Fix bug introduced in previous commit
Browse files Browse the repository at this point in the history
  • Loading branch information
EmilianoBruni committed Mar 4, 2024
1 parent a8b396d commit 0274a6e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/mongoose-backend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1084,6 +1084,9 @@ export default class MongooseBackend {
}

async _initDB() {
this.mongoose.set({ autoCreate: false, autoIndex: false });
this._loadModels();

let coll = await this.mongoose.connection.db
.listCollections({ name: 'minion_jobs' })
.next();
Expand Down Expand Up @@ -1139,8 +1142,6 @@ export default class MongooseBackend {
}
});
}
this.mongoose.set({ autoCreate: false, autoIndex: false });
this._loadModels();
this._isDBInitialized = true;
}

Expand Down

0 comments on commit 0274a6e

Please sign in to comment.