fix(core): update

This commit is contained in:
2023-08-15 01:01:16 +02:00
parent 0e55cd8876
commit 2ff3a4e0b7
8 changed files with 186 additions and 116 deletions

View File

@ -257,7 +257,7 @@ export class SmartDataDbDoc<T extends TImplements, TImplements, TManager extends
* updates an object from db
*/
public async updateFromDb() {
const mongoDbNativeDoc = await this.collection.findOne(this.createIdentifiableObject());
const mongoDbNativeDoc = await this.collection.findOne(await this.createIdentifiableObject());
for (const key of Object.keys(mongoDbNativeDoc)) {
this[key] = mongoDbNativeDoc[key];
}