Opened 10 years ago

Closed 9 years ago

#4457 closed defect (fixed)

Unable to use an empty separator

Reported by: Cheung Kwok-kuen Owned by: Noah Kantrowitz
Priority: normal Component: DateFieldPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11


I defined this in conf/trac.ini,

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/", 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 (0)

Change History (1)

comment:1 Changed 9 years ago by Robert Corsaro

Resolution: fixed
Status: newclosed

(In [6154]) fixed #4457

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Noah Kantrowitz.
The resolution will be deleted.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.