https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15165
Lari Taskula <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #59933|0 |1 is obsolete| | --- Comment #46 from Lari Taskula <[email protected]> --- Created attachment 59934 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=59934&action=edit Bug 15165: Set amount parameter required, define its data type and confirm amount > 0 This patch enforces "amount" to be required when paying towards accountline(s). It also specifies the data type of amount, so that nonsense amounts like "strings" cannot go through. Also, defines minimum amount as 0 and exclusiveMinimum true so that the amount must be greater than 0 (and not equal). This patch also wraps the operations in try/catch as now recommended. Possible enhancements to Koha::Account->pay could also be done so that we would catch Koha::Exceptions in the case of invalid input. However, this is probably outside the scope of this bug and would require more testing on other components as well. After all, we can handle the input nicely with Swagger alone. To test: 1. prove t/db_dependent/api/v1/accountlines.t 2. prove t/db_dependent/api/v1/patrons.t -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
