Skip to content

Commit

Permalink
fix: CommonDao.create part should be optional
Browse files Browse the repository at this point in the history
  • Loading branch information
kirillgroshkov committed Jan 13, 2022
1 parent a53187b commit 36f1971
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/commondao/common.dao.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export class CommonDao<
}

// CREATE
create(part: Partial<BM>, opt: CommonDaoOptions = {}): Saved<BM> {
create(part: Partial<BM> = {}, opt: CommonDaoOptions = {}): Saved<BM> {
let bm = this.cfg.hooks!.beforeCreate!(part) as BM
bm = this.validateAndConvert(bm, this.cfg.bmSchema, DBModelType.BM, opt)

Expand Down

0 comments on commit 36f1971

Please sign in to comment.