[Plugin] balance: Raise conflict if limit exceeded.
This commit is contained in:
parent
2daa79ee15
commit
791656147e
|
@ -80,7 +80,7 @@ def send(sender: User, receiver, amount: float, author: User):
|
|||
if (get_balance(sender)[2] - amount) < sender.get_attribute(__attribute_limit) and not author.has_permission(
|
||||
permissions.EXCEED_LIMIT
|
||||
):
|
||||
raise BadRequest("Limit exceeded")
|
||||
raise Conflict("Limit exceeded")
|
||||
|
||||
transaction = Transaction(sender_=sender, receiver_=receiver, amount=amount, author_=author)
|
||||
db.session.add(transaction)
|
||||
|
|
Loading…
Reference in New Issue