From 0438c7046693381acc12367e8a4466777a37bfe4 Mon Sep 17 00:00:00 2001 From: Art Rhyno Date: Mon, 25 Jul 2011 18:05:08 -0400 Subject: [PATCH] Force call number prefix and suffix to default integer when not defined. Signed-off-by: Art Rhyno --- conifer/syrup/views/items.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/conifer/syrup/views/items.py b/conifer/syrup/views/items.py index 58b2274..6fe90e7 100644 --- a/conifer/syrup/views/items.py +++ b/conifer/syrup/views/items.py @@ -305,9 +305,9 @@ def item_add_cat_search(request, site_id, item_id): # TODO: the Leddy stuff here belongs in an integration-module function. [GF] # - no longer Leddy specific [AR] - eg_prefix = '' + eg_prefix = -1 eg_callno = '' - eg_suffix = '' + eg_suffix = -1 eg_modifier = '' eg_location = '' @@ -315,6 +315,10 @@ def item_add_cat_search(request, site_id, item_id): if bar_num and hasattr(settings, 'OPENSRF_STAFF_USERID'): # TODO: we need an explicit 'we do updates' flag barcode = bar_num eg_modifier, eg_location, eg_prefix, eg_callno, eg_suffix = opensrf.ils_item_info(barcode) + if not eg_prefix: + eg_prefix = -1 + if not eg_suffix: + eg_suffix = -1 if bibid: item = site.item_set.create(parent_heading=parent_item, title=dublin.get('dc:title','Untitled'), -- 2.11.0