mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-20 23:00:34 +00:00
fix: Array cast of recognize function rule ids
This commit is contained in:
@@ -78,9 +78,9 @@ export class RecognizeTranasctionsService {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const bankRules = await BankRule.query(trx).onBuild((q) => {
|
const bankRules = await BankRule.query(trx).onBuild((q) => {
|
||||||
const rulesIds = castArray(ruleId);
|
const rulesIds = !isEmpty(ruleId) ? castArray(ruleId) : [];
|
||||||
|
|
||||||
if (!isEmpty(rulesIds)) {
|
if (rulesIds?.length > 0) {
|
||||||
q.whereIn('id', rulesIds);
|
q.whereIn('id', rulesIds);
|
||||||
}
|
}
|
||||||
q.withGraphFetched('conditions');
|
q.withGraphFetched('conditions');
|
||||||
|
|||||||
Reference in New Issue
Block a user