Bug 22593: Fix bad ternaries after bug 22008
authorMartin Renvoize <martin.renvoize@ptfs-europe.com>
Wed, 27 Mar 2019 13:55:05 +0000 (13:55 +0000)
committerNick Clemens <nick@bywatersolutions.com>
Thu, 28 Mar 2019 13:40:44 +0000 (13:40 +0000)
commitd522d80c5cdb1f9c097e028499815dca6e9259cf
treefde452ad5a217a1590b95e81ef486eee8b8d8ef4
parent3c69e084d7b1fd75dd04f5dc35fb99ceca9efb39
Bug 22593: Fix bad ternaries after bug 22008

A series of ternaries were introduced when we moved to add_debit which
defaulted to 'user 0' should a userenv not be set.  This was incorrect
as userenv may well not be set (during cronscript runs for example) and
the new constraint would not allow such a default. We switch to 'undef'
here to satisfy the constraint.

Test plan
1) Ensure you have data in your system that would be caught by the
longoverdues cronjob.
2) Ensure you're sysprefs are setup to charge for lost items
3) Run the script and varify it runs to completion without errors

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
C4/Accounts.pm
C4/Circulation.pm
C4/Reserves.pm
Koha/Hold.pm
Koha/Patron.pm