Bug 31437: (bug 30718 follow-up) Prevent useless indexation call from ModDateLastSeen
Koha::Object->store is triggering an UPDATE because the datelastseen is different than the value in DB (comparing a datetime with a date) Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
1b7db7e369
commit
6d9c1403fb
1 changed files with 1 additions and 1 deletions
|
@ -400,7 +400,7 @@ sub ModDateLastSeen {
|
|||
my ( $itemnumber, $leave_item_lost, $params ) = @_;
|
||||
|
||||
my $item = Koha::Items->find($itemnumber);
|
||||
$item->datelastseen(dt_from_string);
|
||||
$item->datelastseen(dt_from_string->ymd);
|
||||
my $log = $item->itemlost && !$leave_item_lost ? 1 : 0; # If item was lost, record the change to the item
|
||||
$item->itemlost(0) unless $leave_item_lost;
|
||||
$item->store({ log_action => $log, skip_record_index => $params->{skip_record_index}, skip_holds_queue => $params->{skip_holds_queue} });
|
||||
|
|
Loading…
Reference in a new issue