Ignore:
Timestamp:
02/28/12 12:11:42 (9 years ago)
Author:
pcosquer
Message:

merge changes from trunk [814]
tests fails...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3D/openPLM/plmapp/query_parser.py

    r662 r817  
    99    SQ = None 
    1010 
    11 split = re.compile("[%s]" % re.escape(string.punctuation)).split 
     11split = re.compile("[%s]+" % re.escape(string.punctuation)).split 
    1212 
    1313class Alternatives(List): 
     
    6565        # for example, we replace 51 with 51 or 051 or 0051... 
    6666        sq = SQ() 
     67        if text == "*": 
     68            qualifier = "content" 
    6769        if text.endswith("*"): 
    6870            text = text.rstrip("*") 
     
    7072            for item in items[:-1]: 
    7173                sq &= convert_number(item, qualifier) 
    72             suffix = "*" if qualifier == "content" else "" 
     74            suffix = "*" if qualifier in ("text", "content") else "" 
    7375            sq &= SQ(**{ qualifier + "__startswith" : items[-1]+suffix}) 
    7476        else: 
Note: See TracChangeset for help on using the changeset viewer.