]> git.parisson.com Git - django-postman.git/commitdiff
Fix issue #32 3.0.1
authorPatrick Samson <pk.samson@gmail.com>
Sat, 3 Aug 2013 20:11:14 +0000 (22:11 +0200)
committerPatrick Samson <pk.samson@gmail.com>
Sat, 3 Aug 2013 20:11:14 +0000 (22:11 +0200)
CHANGELOG
docs/conf.py
postman/__init__.py
postman/query.py
postman/tests.py

index 02a64b62ab16535d09ac6f7ce265eebc16a59129..be75a53c911b009b50950f261ba0fad9ae6ec8bb 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -2,6 +2,10 @@
 Django Postman changelog
 ========================
 
+Version 3.0.1, August 2013
+--------------------------
+* Fix issue #32, an IndexError when a Paginator is used and the folder is empty.
+
 Version 3.0.0, July 2013
 ------------------------
 * !MAJOR! Redesign the DB queries for the 'by conversation' mode,
index c7040779d279d6453cf1dd3f61f995c90d2024c1..972e1b6aa86443b0febb03522b09403b8ee049a4 100644 (file)
@@ -47,7 +47,7 @@ copyright = u'2010, Patrick Samson'
 # The short X.Y version.\r
 version = '3.0'\r
 # The full version, including alpha/beta/rc tags.\r
-release = '3.0.0'\r
+release = '3.0.1'\r
 \r
 # The language for content autogenerated by Sphinx. Refer to documentation\r
 # for a list of supported languages.\r
index 0d02e1ba1a55db2bd2c3e3318b241b8d484b1b1d..decc7d4a649a5132b0b08ede7c1f773c95d8aa1d 100644 (file)
@@ -4,7 +4,7 @@ A messaging application for Django
 from __future__ import unicode_literals
 
 # following PEP 386: N.N[.N]+[{a|b|c|rc}N[.N]+][.postN][.devN]
-VERSION = (3, 0, 0)
+VERSION = (3, 0, 1)
 PREREL = ()
 POST = 0
 DEV = 0
index 59dd04e059f68c721f62e264e69a6924b22564d8..a0a17b5fbff66f788c8362d694cdd1f654ff0917 100644 (file)
@@ -36,6 +36,8 @@ class CompilerProxy(Proxy):
     # @Override
     def as_sql(self, *args, **kwargs):
         sql, params = self._target.as_sql(*args, **kwargs)
+        if not sql:  # is the case with a Paginator on an empty folder
+            return sql, params
         # mimics compiler.py/SQLCompiler/get_from_clause() and as_sql()
         qn = self.quote_name_unless_alias
         qn2 = self.connection.ops.quote_name
index b7055bb198899749b96ee931da08872a79066d02..d5fae8e80b2b61abad71def430ca5a734032ac4e 100644 (file)
@@ -76,7 +76,7 @@ class GenericTest(TestCase):
     Usual generic tests.
     """
     def test_version(self):
-        self.assertEqual(sys.modules['postman'].__version__, "3.0.0")
+        self.assertEqual(sys.modules['postman'].__version__, "3.0.1")
 
 
 class BaseTest(TestCase):