mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-12-28 18:01:26 -06:00
No check if no accounts submitted.
This commit is contained in:
parent
4111973a06
commit
dfca5b8722
@ -100,6 +100,14 @@ trait TransactionValidation
|
||||
$transactionType = $transaction['type'] ?? $originalType;
|
||||
$accountValidator->setTransactionType($transactionType);
|
||||
|
||||
// if no account types are given, just skip the check.
|
||||
if (!isset($transaction['source_id'])
|
||||
&& !isset($transaction['source_name'])
|
||||
&& !isset($transaction['destination_id'])
|
||||
&& !isset($transaction['destination_name'])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// validate source account.
|
||||
$sourceId = isset($transaction['source_id']) ? (int)$transaction['source_id'] : $originalData['source_id'];
|
||||
$sourceName = $transaction['source_name'] ?? $originalData['source_name'];
|
||||
|
Loading…
Reference in New Issue
Block a user