rqlrewrite.py
changeset 8112 d3f1e28d5bdb
parent 8074 a7f76e322659
child 8147 335b358c7017
equal deleted inserted replaced
8111:d1be698018d2 8112:d3f1e28d5bdb
   247                 exists = varexistsmap[varmap]
   247                 exists = varexistsmap[varmap]
   248                 if self.exists_snippet[rqlexpr] is exists:
   248                 if self.exists_snippet[rqlexpr] is exists:
   249                     self.insert_snippet(varmap, rqlexpr.snippet_rqlst, exists)
   249                     self.insert_snippet(varmap, rqlexpr.snippet_rqlst, exists)
   250         if varexistsmap is None and not inserted:
   250         if varexistsmap is None and not inserted:
   251             # no rql expression found matching rql solutions. User has no access right
   251             # no rql expression found matching rql solutions. User has no access right
   252             raise Unauthorized() # XXX bad constraint when inserting constraints
   252             raise Unauthorized() # XXX may also be because of bad constraints in schema definition
   253 
   253 
   254     def insert_snippet(self, varmap, snippetrqlst, parent=None):
   254     def insert_snippet(self, varmap, snippetrqlst, parent=None):
   255         new = snippetrqlst.where.accept(self)
   255         new = snippetrqlst.where.accept(self)
   256         existing = self.existingvars
   256         existing = self.existingvars
   257         self.existingvars = None
   257         self.existingvars = None