Avoid crashing in the Scan As Missing Pieces interface when a pre-cat
copy is used by using the dummy title instead of a nonexistent simple
record title.
Signed-off-by: Bill Erickson <berickxx@gmail.com>
function mark_missing_pieces(copy) {
+ var title =
+ copy.call_number().id() == -1 ? // precat copy
+ copy.dummy_title() :
+ copy.call_number().record().simple_record().title();
+
egConfirmDialog.open(
egCore.strings.CONFIRM_MARK_MISSING_TITLE,
egCore.strings.CONFIRM_MARK_MISSING_BODY, {
barcode : copy.barcode(),
- title : copy.call_number().record().simple_record().title()
+ title : title
}).result.then(function() {