solvebio-python icon indicating copy to clipboard operation
solvebio-python copied to clipboard

Filtering by "contains" doesn't work with "_"

Open davidhpark opened this issue 6 years ago • 0 comments

Filtering for '_' using the 'contains' operator does not work:

In [50]: [q['amino_acid_change'] for q in query.filter(amino_acid_change__contains='_')]
Out[50]: []

However, filtering for '_' does work using the 'regexp' operator:

In [49]: [q['amino_acid_change'] for q in query.filter(amino_acid_change__regexp='.*_.*')]
Out[49]: 
[u'G504_P511del',
 ...
 u'P491_G492del']

davidhpark avatar Jan 16 '19 21:01 davidhpark