[open-ils-commits] r1200 - in servres/trunk/conifer: integration syrup/views (artunit)
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Jan 17 10:43:52 EST 2011
Author: artunit
Date: 2011-01-17 10:43:50 -0500 (Mon, 17 Jan 2011)
New Revision: 1200
Modified:
servres/trunk/conifer/integration/uwindsor.py
servres/trunk/conifer/syrup/views/items.py
Log:
more handling for bib_id, still inconsistent for z39.50 but other searching should be fine
Modified: servres/trunk/conifer/integration/uwindsor.py
===================================================================
--- servres/trunk/conifer/integration/uwindsor.py 2011-01-16 05:33:22 UTC (rev 1199)
+++ servres/trunk/conifer/integration/uwindsor.py 2011-01-17 15:43:50 UTC (rev 1200)
@@ -169,8 +169,11 @@
elif bc:
results = []
numhits = 0
+ # print "bc", bc.group(0)
bib = E1('open-ils.search.bib_id.by_barcode', bc.group(0))
if bib:
+ bibid = bib
+ # print "bibid", bib
copy = E1('open-ils.supercat.record.object.retrieve', bib)
rec = copy[0]
marc = unicode(rec['marc'], 'utf-8')
Modified: servres/trunk/conifer/syrup/views/items.py
===================================================================
--- servres/trunk/conifer/syrup/views/items.py 2011-01-16 05:33:22 UTC (rev 1199)
+++ servres/trunk/conifer/syrup/views/items.py 2011-01-17 15:43:50 UTC (rev 1200)
@@ -293,13 +293,24 @@
except:
pubdate = ''
- item = site.item_set.create(parent_heading=parent_item,
+ bibid = bib_id=request.POST.get('bibid')
+ if bibid > 0:
+ item = site.item_set.create(parent_heading=parent_item,
title=dublin.get('dc:title','Untitled'),
author=dublin.get('dc:creator'),
publisher=dublin.get('dc:publisher',''),
published=pubdate,
+ bib_id = bibid,
marcxml=raw_pickitem,
**dct)
+ else:
+ item = site.item_set.create(parent_heading=parent_item,
+ title=dublin.get('dc:title','Untitled'),
+ author=dublin.get('dc:creator'),
+ publisher=dublin.get('dc:publisher',''),
+ published=pubdate,
+ marcxml=raw_pickitem,
+ **dct)
item.save()
return HttpResponseRedirect(item.parent_url())
More information about the open-ils-commits
mailing list