Commit 5fc9ba4
authored
fix(tasks): use document .save() instead of new Model() in repository update (#3440)
* fix(tasks): use document .save() instead of new Model() in repository update
Prevents duplicate document creation when the update function receives a
mongoose document without a recognized _id or with isNew still set.
Aligns tasks repository with the pattern already used by organizations
and memberships repositories.
Closes #3433
* fix(tasks): update JSDoc param type for update() to reflect Mongoose document requirement1 parent 87a4553 commit 5fc9ba4
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| |||
0 commit comments