compare NFC
This commit is contained in:
parent
88f9f2d27e
commit
52f45beaec
4 changed files with 11 additions and 7 deletions
|
|
@ -3,6 +3,7 @@
|
|||
import json
|
||||
import hashlib
|
||||
import os
|
||||
import unicodedata
|
||||
|
||||
from sqlalchemy.orm import load_only
|
||||
from sqlalchemy.sql.expression import text
|
||||
|
|
@ -211,6 +212,7 @@ def autocomplete(data):
|
|||
qs = qs.filter(models.Find.item_id.in_(items))
|
||||
if data['value']:
|
||||
value = data['value'].lower()
|
||||
value = unicodedata.normalize('NFKD', value)
|
||||
qs = qs.filter(models.Find.key.is_(data['key']))
|
||||
if op == '=':
|
||||
qs = qs.filter(models.Find.findvalue.contains(value))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue