Merge pull request #5313 from jsangmeister/fix-user-import

Fixed user import
This commit is contained in:
Finn Stutzenstein 2020-04-15 13:44:30 +02:00 committed by GitHub
commit 1570b5b806
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,7 +5,11 @@ export abstract class BaseDecimalModel<T = any> extends BaseModel<T> {
public deserialize(input: any): void {
if (input && typeof input === 'object') {
this.getDecimalFields().forEach(field => (input[field] = parseInt(input[field], 10)));
this.getDecimalFields().forEach(field => {
if (input[field] !== undefined) {
input[field] = parseInt(input[field], 10);
}
});
}
super.deserialize(input);
}