Skip to content

Commit

Permalink
blacked
Browse files Browse the repository at this point in the history
  • Loading branch information
daniele-andreotti committed Nov 8, 2024
1 parent a3d261b commit 4eb6b57
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions rer/bandi/query_index_modifiers.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

@implementer(IParsedQueryIndexModifier)
class BandiKeywordIndex(object):

"""
All Keyword fields in Plone currently uses a utf-8 encoded string.
When a catalog query tries to compare a unicode string from the
Expand All @@ -22,7 +21,7 @@ class BandiKeywordIndex(object):
"""

def __call__(self, value):
query = value['query']
query = value["query"]
# query can be a unicode string or a list of unicode strings.
if six.PY2 and isinstance(query, six.text_type):
query = query.encode("utf-8")
Expand All @@ -40,25 +39,25 @@ def __call__(self, value):
query = copy_of_query
else:
pass
value['query'] = query
value["query"] = query
return (self.index_name, value)


class Destinatari(BandiKeywordIndex):

index_name = 'destinatari'
index_name = "destinatari"


class Tipologia(BandiKeywordIndex):

index_name = 'tipologia_bando'
index_name = "tipologia_bando"


class Finanziatori(BandiKeywordIndex):

index_name = 'finanziatori'
index_name = "finanziato"


class Materie(BandiKeywordIndex):

index_name = 'materie'
index_name = "materie"

0 comments on commit 4eb6b57

Please sign in to comment.