From: gfawcett Date: Sun, 5 Apr 2009 21:25:54 +0000 (+0000) Subject: argh, bugfix in model. Minor tweak to template. X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=e01a752da0d2c6ee800430a8bad85dad1ba8acd5;p=Syrup.git argh, bugfix in model. Minor tweak to template. git-svn-id: svn://svn.open-ils.org/ILS-Contrib/servres/trunk@280 6d9bc8c9-1ec2-4278-b937-99fde70a366f --- diff --git a/conifer/syrup/models.py b/conifer/syrup/models.py index 4258dd6..b0f8574 100644 --- a/conifer/syrup/models.py +++ b/conifer/syrup/models.py @@ -599,13 +599,15 @@ class PhysicalObject(m.Model): def save(self, force_insert=False, force_update=False): # Must ensure that barcode is unique for non-departed items. Same with smallint try: + unique_thing = 'barcode' already = PhysicalObject.objects.exclude(pk=self.id).get(departed=None) + unique_thing = 'smallint' if self.smallint: - already = PhysicalObject.objects.exclude(pk=self.id).get(smallint=smallint) + already = PhysicalObject.objects.exclude(pk=self.id).get(smallint=self.smallint) except PhysicalObject.DoesNotExist: super(PhysicalObject, self).save(force_insert, force_update) else: - raise AssertionError, 'barcode is not unique in active PhysicalObject collection.' + raise AssertionError, '%s is not unique in active PhysicalObject collection.' % unique_thing @classmethod def by_smallint(cls, smallint): diff --git a/conifer/templates/item_add_cat_search.xhtml b/conifer/templates/item_add_cat_search.xhtml index b41f1fe..05ddd1c 100644 --- a/conifer/templates/item_add_cat_search.xhtml +++ b/conifer/templates/item_add_cat_search.xhtml @@ -30,7 +30,7 @@ dc_keys = ['dc:title', 'dc:creator', 'dc:publisher', 'dc:date'] - +
TitleAuthorPublisherPubDate