1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2025-02-24 15:27:43 +01:00

fix: 🐛 Salva negli attributi di default

This commit is contained in:
Maicol Battistini 2022-01-03 13:53:36 +01:00
parent 080d70bd49
commit a864b6f913
No known key found for this signature in database
GPG Key ID: 4FDB0F87CDB1D34A

View File

@ -68,13 +68,7 @@ export default class Model extends BaseModel {
return target.relationValue(property, 'set', value); return target.relationValue(property, 'set', value);
} }
const snakeCasedProperty = snakeCase(property); return target.setAttribute(snakeCase(property), value);;
if (snakeCasedProperty in target.getAttributes()) {
target.setAttribute(snakeCasedProperty, value);
return true;
}
return Reflect.set(target, property, value, receiver);
} }
}); });
} }