mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
correct check amount lte zero
This commit is contained in:
parent
b9c48d8760
commit
a73ff0aadf
@ -518,7 +518,7 @@ export class AdminResolver {
|
||||
throw new Error('The amount must be initialized!')
|
||||
}
|
||||
const amountObj = new Decimal(amount)
|
||||
if (amountObj.isZero || amountObj.isNegative()) {
|
||||
if (amountObj.lessThanOrEqualTo(new Decimal(0))) {
|
||||
logger.error(`The amount=${amount} must be initialized with a positiv value!`)
|
||||
throw new Error(`The amount=${amount} must be initialized with a positiv value!`)
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user