Will not store fields with empty strings or weird value

This commit is contained in:
James Cole
2018-04-22 08:07:33 +02:00
parent 529dd490b7
commit 49421f50ac
2 changed files with 19 additions and 11 deletions

View File

@@ -51,6 +51,10 @@ class AccountUpdateService
$account->iban = $data['iban'];
$account->save();
if($data['currency_id'] === 0) {
unset($data['currency_id']);
}
// update all meta data:
$this->updateMetaData($account, $data);