Return an item title, even if the checkout failed (assuming that
authordjfiander <djfiander>
Wed, 26 Apr 2006 13:34:31 +0000 (13:34 +0000)
committerdjfiander <djfiander>
Wed, 26 Apr 2006 13:34:31 +0000 (13:34 +0000)
the item ID was valid).

Sip/MsgType.pm

index e71fc4b..bf11e18 100644 (file)
@@ -595,8 +595,9 @@ sub handle_checkout {
        $resp .= add_field(FID_PATRON_ID, $patron_id);
        $resp .= add_field(FID_ITEM_ID, $item_id);
 
-       # We don't know the title, but it's required, so leave it blank
-       $resp .= add_field(FID_TITLE_ID, '');
+       # If the item is valid, provide the title, otherwise
+       # leave it blank
+       $resp .= add_field(FID_TITLE_ID, $item ? $item->title_id : '');
        # Due date is required.  Since it didn't get checked out,
        # it's not due, so leave the date blank
        $resp .= add_field(FID_DUE_DATE, '');