Bug 23064: Use Koha::Subscription in ModSubscription
commit4c0fc622a5ca6029e6c0b1dee42ac50a090ed32c
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 20 Nov 2019 11:22:58 +0000 (20 12:22 +0100)
committerLucas Gass <lucas@bywatersolutions.com>
Thu, 13 Feb 2020 20:41:35 +0000 (13 20:41 +0000)
tree87a4b8c46df47f640c7bcf7714f9fcef14cc915e
parentafab0af590c320a1d57e4ea1305a4ff83f988851
Bug 23064: Use Koha::Subscription in ModSubscription

We must use Koha::Subscription instead of raw SQL.
It will fix issue with default and integer values.

Test plan:
Edit a subscription and set number of issues = "f"
Save
=> Without this patch there is a SQL error in the log:
  Incorrect integer value: 'f' for column 'numberlength'
=> With this patch the other changes are effective.

Note: We also could change the type attribute of the input to "number",
to have a client-side check

Also, the return value of ModSuggestion is never used, so we are safe
with that.

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit d79888822bba76c1eab3530f5b792bd7c88bbbde)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
C4/Serials.pm