mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Delete account meta data when field is made empty.
This commit is contained in:
@@ -346,6 +346,9 @@ trait AccountServiceTrait
|
|||||||
Log::debug(sprintf('Updated meta-field "%s":"%s" for #%d ("%s") ', $field, $data[$field], $account->id, $account->name));
|
Log::debug(sprintf('Updated meta-field "%s":"%s" for #%d ("%s") ', $field, $data[$field], $account->id, $account->name));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (null !== $entry && isset($data[$field]) && \strlen((string)$data[$field]) === 0) {
|
||||||
|
$entry->delete();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user