Exemplo n.º 1
0
 def _getArgCondFilter(self, rq_args, activate_it=True):
     if rq_args.get("filter"):
         filter_h = self.pickSolEntry("filter", rq_args["filter"])
         assert filter_h is not None
     else:
         if "conditions" in rq_args:
             cond_data = json.loads(rq_args["conditions"])
         else:
             cond_data = ConditionMaker.condAll()
         filter_h = FilterEval(self.getEvalSpace(), cond_data)
     filter_h = self.updateSolEntry("filter", filter_h)
     if activate_it:
         filter_h.activate()
     return filter_h
Exemplo n.º 2
0
 def _getArgCondFilter(self, rq_args,
         activate_it = True, join_cond_data = None):
     filter_h, cond_data = None, None
     if rq_args.get("filter"):
         filter_h = self.pickSolEntry("filter", rq_args["filter"])
         assert filter_h is not None, "No filter for: " + rq_args["filter"]
         if join_cond_data is not None:
             cond_data = filter_h.getCondDataSeq()
             filter_h = None
     if filter_h is None and cond_data is None:
         if "conditions" in rq_args:
             cond_data = json.loads(rq_args["conditions"])
         else:
             cond_data = ConditionMaker.condAll()
     if join_cond_data is not None:
         assert filter_h is None, "Filter&join collision"
         cond_data = cond_data[:] + join_cond_data[:]
     if filter_h is None:
         filter_h = FilterEval(self.getEvalSpace(), cond_data)
     filter_h = self.updateSolEntry("filter", filter_h)
     if activate_it:
         filter_h.activate()
     return filter_h