Skip to content

Commit

Permalink
import
Browse files Browse the repository at this point in the history
  • Loading branch information
theorm committed Jan 9, 2025
1 parent 8fb743c commit c03d558
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/services/sequelize.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class SequelizeService {
this.sequelize = sequelize.client(app.get('sequelize'))
loadDynamicModule(`../models/${this.modelName}.model`)
.then(m => {
this.Model = m.Model ?? m.default ?? m
this.Model = m.Model ?? m.default?.default ?? m.default ?? m
this.sequelizeKlass = this.Model.sequelize(this.sequelize)

debug(`Configuring service: ${this.name} (model:${this.modelName}) success!`)
Expand Down

0 comments on commit c03d558

Please sign in to comment.