Ticket #4457 (closed defect: fixed)

Opened 1 year ago

Last modified 8 months ago

Unable to use an empty separator

Reported by: cheungpat Assigned to: coderanger
Priority: normal Component: DateFieldPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

I defined this in conf/trac.ini,

[datefield]
format = ymd
separator = 

expecting to use the format YYYYMMDD. When I input such date into the form, the Trac gives me a validation failure. The following message appears in the log file,

Trac[filter] DEBUG: DateFieldModule: Got an exception, assuming it is a validation failure.
Traceback (most recent call last):
   File "build/bdist.linux-i686/egg/datefield/filter.py", line 72, in validate_ticket
     if len(val.split(self.date_sep)) != 3:
ValueError: empty separator

Looking at the code, it seems the validation code always expect a separator.

This probably isn't a serious issue... people can certainly use YYYY-MM-DD instead.

Attachments

Change History

07/03/09 18:17:53 changed by doki_pen

  • status changed from new to closed.
  • resolution set to fixed.

(In [6154]) fixed #4457


Add/Change #4457 (Unable to use an empty separator)




Change Properties
Action