Author: peter
Date: Thu Jan 24 11:37:39 2013
New Revision: 1437967

URL: http://svn.apache.org/viewvc?rev=1437967&view=rev
Log:
#330 - Lazy evaluation of req.chrome: Skip theme post processing when we are 
dealing with REST API calls (no templates)

Modified:
    incubator/bloodhound/trunk/bloodhound_theme/bhtheme/theme.py

Modified: incubator/bloodhound/trunk/bloodhound_theme/bhtheme/theme.py
URL: 
http://svn.apache.org/viewvc/incubator/bloodhound/trunk/bloodhound_theme/bhtheme/theme.py?rev=1437967&r1=1437966&r2=1437967&view=diff
==============================================================================
--- incubator/bloodhound/trunk/bloodhound_theme/bhtheme/theme.py (original)
+++ incubator/bloodhound/trunk/bloodhound_theme/bhtheme/theme.py Thu Jan 24 
11:37:39 2013
@@ -213,6 +213,10 @@ class BloodhoundTheme(ThemeBase):
     def post_process_request(self, req, template, data, content_type):
         """Post process request filter.
         Removes all trac provided css if required"""
+        
+        if template is None and data is None:
+            return template, data, content_type
+        
         def is_active_theme():
             is_active = False
             active_theme = ThemeEngineSystem(self.env).theme


Reply via email to