From: Marcin Koziej Date: Thu, 9 Aug 2012 16:03:15 +0000 (+0200) Subject: exclude '' slug not null X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/e702c3da468a55bb04ba5899ef26ad789a5c8cd1?ds=inline;hp=162d876b6e05f4bacf2473148a989a4e2b93a2ed exclude '' slug not null --- 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')