Skip to content

Commit

Permalink
BugGenerating clean data should not remove id
Browse files Browse the repository at this point in the history
  • Loading branch information
MKHenson committed Apr 19, 2016
1 parent ebb53c4 commit 151324f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
5 changes: 1 addition & 4 deletions server/dist/src/models/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,7 @@ var Schema = (function () {
continue;
toReturn[items[i].name] = items[i].getValue();
}
if (sanitize)
toReturn._id = null;
else
toReturn._id = id;
toReturn._id = id;
return toReturn;
};
/**
Expand Down
5 changes: 1 addition & 4 deletions server/src/models/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,7 @@ export class Schema
toReturn[items[i].name] = items[i].getValue();
}

if (sanitize)
(<IModelEntry>toReturn)._id = null;
else
(<IModelEntry>toReturn)._id = id;
(<IModelEntry>toReturn)._id = id;

return toReturn;
}
Expand Down

0 comments on commit 151324f

Please sign in to comment.