Skip to content
Browse files

Fixed the compress management command to work on Django 1.4.

  • Loading branch information...
1 parent f576dcd commit ab9709515d6f606d83b14471d14a59a5927aeb7c @jezdez jezdez committed Jan 24, 2012
Showing with 4 additions and 3 deletions.
  1. +4 −3 compressor/management/commands/compress.py
View
7 compressor/management/commands/compress.py
@@ -233,10 +233,11 @@ def compress(self, log=None, **options):
return count, results
def get_nodelist(self, node):
- if isinstance(node, IfNode):
+ if (isinstance(node, IfNode) and
+ hasattr(node, 'nodelist_true') and
+ hasattr(node, 'nodelist_false')):
return node.nodelist_true + node.nodelist_false
- else:
- return getattr(node, "nodelist", [])
+ return getattr(node, "nodelist", [])
def walk_nodes(self, node, block_name=None):
for node in self.get_nodelist(node):

0 comments on commit ab97095

Please sign in to comment.
Something went wrong with that request. Please try again.