From e702c3da468a55bb04ba5899ef26ad789a5c8cd1 Mon Sep 17 00:00:00 2001 From: Marcin Koziej Date: Thu, 9 Aug 2012 18:03:15 +0200 Subject: [PATCH 1/1] exclude '' slug not null --- apps/oai/handlers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/oai/handlers.py b/apps/oai/handlers.py index a1f2da39e..e37fc084d 100644 --- a/apps/oai/handlers.py +++ b/apps/oai/handlers.py @@ -52,7 +52,7 @@ class Catalogue(common.ResumptionOAIPMH): try: earliest_delete = \ - Deleted.objects.ordery_by('deleted_at')[0].deleted_at + Deleted.objects.exclude(slug__exact=u'').ordery_by('deleted_at')[0].deleted_at except: earliest_delete = year_zero self.earliest_datestamp = earliest_change <= earliest_delete and \ @@ -102,7 +102,7 @@ class Catalogue(common.ResumptionOAIPMH): # books = Book.tagged.with_all([tag]) else: books = Book.objects.all() - deleted = Deleted.objects.filter(slug__isnull=False) + deleted = Deleted.objects.exclude(slug__exact=u'') books = books.order_by('changed_at') deleted = deleted.order_by('deleted_at') -- 2.20.1