Skip updating empty dict over context
authorMarkus Törnqvist <mjt@fadconsulting.com>
Wed, 26 Jun 2013 13:02:56 +0000 (16:02 +0300)
committerMarkus Törnqvist <mjt@fadconsulting.com>
Wed, 26 Jun 2013 13:02:56 +0000 (16:02 +0300)
linaro_django_pagination/templatetags/pagination_tags.py

index be22347..affdc16 100644 (file)
@@ -186,7 +186,7 @@ class PaginateNode(Node):
         new_context = paginate(context)
         if self.template:
             template_list.insert(0, self.template)
-        return loader.render_to_string(template_list, new_context, 
+        return loader.render_to_string(template_list, new_context,
             context_instance = context)
 
 
@@ -328,9 +328,7 @@ def paginate(context, window=DEFAULT_WINDOW, margin=DEFAULT_MARGIN):
                 new_context['getvars'] = ''
         return new_context
     except (KeyError, AttributeError):
-        new_context = {}
-
-    context.update(new_context)
+        pass
 
     return context