]> git.koha-community.org Git - koha.git/commit
Bug 23893: Special care for booleans
authorTomas Cohen Arazi <tomascohen@theke.io>
Wed, 15 Jan 2020 12:45:24 +0000 (09:45 -0300)
committerJoy Nelson <joy@bywatersolutions.com>
Sat, 18 Jan 2020 16:01:02 +0000 (16:01 +0000)
commit502c8d046aee82bd82fd894615a6d32ec5e635bc
tree5462c50f6f0a9a919424c21a63236caa04bf88eb
parent706a8f7d318359d1b1d04d7449c0a1687f8d56df
Bug 23893: Special care for booleans

This patch acknowledges the fact that in D8 the Mojo::JSON->true and
Mojo::JSON->false values don't translate into integers when passed to
DBIC. It works correctly on D9 onwards, but we haven't formally
deprecated Jessie. This is adding back this translation, in the right
place now that all mappings code has been integrated into
Koha::Object(s) directly.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Object.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Koha/Object.pm
t/db_dependent/Koha/Object.t