diff options
Diffstat (limited to 'ishtar_common/views_item.py')
| -rw-r--r-- | ishtar_common/views_item.py | 12 | 
1 files changed, 6 insertions, 6 deletions
| diff --git a/ishtar_common/views_item.py b/ishtar_common/views_item.py index ded93212b..636ad26f0 100644 --- a/ishtar_common/views_item.py +++ b/ishtar_common/views_item.py @@ -753,7 +753,7 @@ def _manage_many_counted_fields(fields, reversed_fields, dct, excluded_dct):              dct[k] = None -today_lbl = pgettext_lazy("key for text search", u"today"), +today_lbl = pgettext_lazy("key for text search", "today")  TODAYS = ['today']  for language_code, language_lbl in settings.LANGUAGES: @@ -778,14 +778,14 @@ def _manage_dated_fields(dated_fields, dct):              if value.startswith(today):                  base_date = datetime.date.today()                  value = value[len(today):].replace(' ', '') -                if value and value[0] in (u"-", u"+"): +                if value and value[0] in ("-", "+"):                      sign = value[0]                      try:                          days = int(value[1:])                      except ValueError:                          days = 0                      if days: -                        if sign == u"-": +                        if sign == "-":                              base_date = base_date - datetime.timedelta(                                  days=days)                          else: @@ -813,10 +813,10 @@ def _manage_dated_fields(dated_fields, dct):  def _clean_type_val(val):      for prefix in GeneralType.PREFIX_CODES: -        val = val.replace(prefix, u"") +        val = val.replace(prefix, "")      val = val.strip() -    if val.startswith(u'"') and val.endswith(u'"'): -        val = u'"{}"'.format(val[1:-1].strip()) +    if val.startswith('"') and val.endswith('"'): +        val = '"{}"'.format(val[1:-1].strip())      return val | 
