Commits

Anonymous committed 949eb9f

fix some bugs

Comments (0)

Files changed (2)

                 {"display" : "RAE 2008", "query" : "[1900-01-01T00:00:00Z TO 1910-01-01T00:00:00Z]"}
             ]
         }
-    }
+    },
     
     "display_facet_order" : ["entity", "publication_date", "org_unit_name", "gender", "fte", "contract_end",
                                 "funding_code", "primary_position"],
                 solr_args["f." + f + ".facet.date.gap"] = args["facet_date"][f]["gap"]
         
         # set up the facet queries
-        for f in args['facet_query'].keys():
-            if not solr_args.has_key("facet.query"):
-                for solr_args["facet.query"] = []
-            for q in args['facet_query'][f]['queries']:
-                solr_args["facet.query"].append(f + ":" + q['query'])
+        if args.has_key('facet_query'):
+            for f in args['facet_query'].keys():
+                if not solr_args.has_key("facet.query"):
+                    solr_args["facet.query"] = []
+                for q in args['facet_query'][f]['queries']:
+                    solr_args["facet.query"].append(f + ":" + q['query'])
         
         # facet mincount from config
         solr_args["facet.mincount"] = self.config.facet_mincount