Modify

Opened 15 years ago

Closed 15 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

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 (0)

Change History (1)

comment:1 Changed 15 years ago by Robert Corsaro

Resolution: fixed
Status: newclosed

(In [6154]) fixed #4457

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Noah Kantrowitz.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.