fix bug; could not save phys item if you do not have OPENSRF_STAFF_USERID defined.
authorgfawcett <gfawcett@6d9bc8c9-1ec2-4278-b937-99fde70a366f>
Sun, 3 Apr 2011 01:08:46 +0000 (01:08 +0000)
committergfawcett <gfawcett@6d9bc8c9-1ec2-4278-b937-99fde70a366f>
Sun, 3 Apr 2011 01:08:46 +0000 (01:08 +0000)
git-svn-id: svn://svn.open-ils.org/ILS-Contrib/servres/trunk@1306 6d9bc8c9-1ec2-4278-b937-99fde70a366f

conifer/syrup/views/items.py

index a0a55f0..02dadcc 100644 (file)
@@ -378,7 +378,7 @@ def item_edit(request, site_id, item_id):
                     del data['author2']
             [setattr(item, k, v) for (k,v) in data.items()]
 
-            if item.item_type == 'PHYS':
+            if item.item_type == 'PHYS' and hasattr(settings, 'OPENSRF_STAFF_USERID'): # TODO: we need an explicit 'we do updates' flag
                 update_option = request.POST.get('update_option')
                 location_option = request.POST.get('location_option')
                 modifier_option = request.POST.get('modifier_option')