diff --git a/rero_ils/modules/patron_transaction_events/api.py b/rero_ils/modules/patron_transaction_events/api.py index 8287537435..e7bb83faff 100644 --- a/rero_ils/modules/patron_transaction_events/api.py +++ b/rero_ils/modules/patron_transaction_events/api.py @@ -82,7 +82,9 @@ def create(cls, data, id_=None, delete_pid=False, """Create patron transaction event record.""" if 'creation_date' not in data: data['creation_date'] = datetime.now(timezone.utc).isoformat() - data['amount'] = round(data['amount'], 2) # ensure multiple of 0.01 + if 'amount' in data: + # ensure multiple of 0.01 + data['amount'] = round(data['amount'], 2) record = super().create( data, id_, delete_pid, dbcommit, reindex, **kwargs) if update_parent: