Bug 33070: Remove use of can_edit_items
[srvgit] / Koha / Item.pm
index b9c591b..a0a18e5 100644 (file)
@@ -296,7 +296,7 @@ sub safe_to_delete {
     $error //= "not_same_branch"
       if defined C4::Context->userenv
       and defined C4::Context->userenv->{number}
-      and !Koha::Patrons->find( C4::Context->userenv->{number} )->can_edit_item( $self );
+      and !Koha::Patrons->find( C4::Context->userenv->{number} )->can_edit_items_from( $self->homebranch );
 
     # check it doesn't have a waiting reserve
     $error //= "book_reserved"