cubicweb/web/views/magicsearch.py
changeset 12882 3ddd03309315
parent 12578 d06a2feae373
equal deleted inserted replaced
12881:38fcf5707295 12882:3ddd03309315
   452             else:
   452             else:
   453                 restrictions, incomplete_part = '', restrictions
   453                 restrictions, incomplete_part = '', restrictions
   454                 user_rql = variables
   454                 user_rql = variables
   455             select = parse(user_rql, print_errors=False).children[0]
   455             select = parse(user_rql, print_errors=False).children[0]
   456             req.vreg.rqlhelper.annotate(select)
   456             req.vreg.rqlhelper.annotate(select)
   457             req.vreg.solutions(req, select, {})
   457             req.vreg.compute_var_types(req, select, {})
   458             if restrictions:
   458             if restrictions:
   459                 return ['%s, %s' % (user_rql, suggestion)
   459                 return ['%s, %s' % (user_rql, suggestion)
   460                         for suggestion in self.rql_build_suggestions(select, incomplete_part)]
   460                         for suggestion in self.rql_build_suggestions(select, incomplete_part)]
   461             else:
   461             else:
   462                 return ['%s WHERE %s' % (user_rql, suggestion)
   462                 return ['%s WHERE %s' % (user_rql, suggestion)