Bug 23893: Catch dt_from_string exceptions
authorTomas Cohen Arazi <tomascohen@theke.io>
Fri, 27 Dec 2019 18:21:30 +0000 (15:21 -0300)
committerJoy Nelson <joy@bywatersolutions.com>
Sat, 18 Jan 2020 16:00:50 +0000 (16:00 +0000)
commit706a8f7d318359d1b1d04d7449c0a1687f8d56df
treea0416d5ae52180acbcfd062e10919d2c75cd4575
parent236fb97d866ae6d9e7bb8a0ac3b64b99a0ea0de9
Bug 23893: Catch dt_from_string exceptions

This patch adds exception handling to the attributes_from_api() method.
This can happen with invalid date/datetimes, for example.

Tests are added:

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: Kyle M Hall <kyle@bywatersolutions.com>
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