Skip to content

Commit

Permalink
only append brackets for args if provided
Browse files Browse the repository at this point in the history
  • Loading branch information
johannes-vogel committed Nov 21, 2024
1 parent bb41808 commit 875e376
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion db-service/lib/cqn2sql.js
Original file line number Diff line number Diff line change
Expand Up @@ -990,7 +990,7 @@ class CQN2SQLRenderer {
} else {
cds.error`Invalid arguments provided for function '${func}' (${args})`
}
const fn = this.class.Functions[func]?.apply(this.class.Functions, args) || `${func}(${args})`
const fn = this.class.Functions[func]?.apply(this.class.Functions, args) || `${func}${args ? `(${args})`: ''}`
if (xpr) return `${fn} ${this.xpr({ xpr })}`
return fn
}
Expand Down

0 comments on commit 875e376

Please sign in to comment.