Modify

Opened 18 years ago

Closed 18 years ago

#1387 closed defect (fixed)

Cannot blank the date field

Reported by: cbillen@… Owned by: Noah Kantrowitz
Priority: normal Component: DateFieldPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.10

Description

Just installed datefield in trac 0.10 and set the configuration to allow for blank values

However, whenever I blank out a date field which previously had a value I get this lovely error:

Python Traceback

Traceback (most recent call last):

File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 387, in dispatch_request

dispatcher.dispatch(req)

File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 238, in dispatch

resp = chosen_handler.process_request(req)

File "/usr/lib/python2.4/site-packages/trac/ticket/web_ui.py", line 279, in process_request

self._do_save(req, db, ticket)

File "/usr/lib/python2.4/site-packages/trac/ticket/web_ui.py", line 536, in _do_save

self._validate_ticket(req, ticket)

File "/usr/lib/python2.4/site-packages/trac/ticket/web_ui.py", line 66, in _validate_ticket

for field, message in manipulator.validate_ticket(req, ticket):

File "build/bdist.linux-i686/egg/datefield/filter.py", line 77, in validate_ticket

NameError: global name 'traceback' is not defined

Attachments (0)

Change History (5)

comment:1 Changed 18 years ago by flatter@…

Same here.

comment:2 Changed 18 years ago by Keith Watson

Yes I get the same and also when I enter an invalid date.

comment:3 Changed 18 years ago by Keith Watson

No strike that, once I configure the field to allow blanks it works [blush].

But anything that causes a validation error gives the above error.

comment:4 Changed 18 years ago by Keith Watson

Problem seems to be the the latest change to source:datefieldplugin/0.10/datefield/filter.py@2106 at line 77

                self.log.debug('DateFieldModule: Got an exception, assuming it is a validation failure.\n'+traceback.format_exc())

If you comment this out validation works fine.

comment:5 Changed 18 years ago by Noah Kantrowitz

Resolution: fixed
Status: newclosed

(In [2172]) Add missing import. (closes #1387)

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.