fix(id field now properly populated): update

This commit is contained in:
2019-09-11 12:12:50 +02:00
parent c1c4a29415
commit 246e3486f0
3 changed files with 7 additions and 6 deletions

View File

@ -103,10 +103,8 @@ export class SmartDataDbDoc<T> {
for (const item of foundDocs) {
const newInstance = new this();
newInstance.creationStatus = 'db';
for (const key in item) {
if (key !== 'id') {
newInstance[key] = item[key];
}
for (const key of Object.keys(item)) {
newInstance[key] = item[key];
}
returnArray.push(newInstance);
}