Edgewall Software
Modify

Opened 18 years ago

Closed 18 years ago

#4945 closed defect (worksforme)

TypeError: can't compare datetime.datetime to NoneType

Reported by: ronald Owned by: Jonas Borgström
Priority: low Milestone:
Component: general Version: devel
Severity: minor Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

How to Reproduce

While doing a POST operation on /milestone/milestone4, Trac issued an internal error.

(please provide additional details here) I edited the other milestones on the default project, and they worked fine. I tried re applying the update on this milestone and it worked fine.

The form post is detailed below for a clean new project.

Request parameters:

{'__FORM_TOKEN': u'37ba096de8aa6b8041c5ab10',
 'action': u'edit',
 'completed': u'on',
 'description': u'Parallel running starts at 9:00am on Tuesday 10th April and completes on the Friday.',
 'duedate': u'04/13/07',
 'id': u'milestone4',
 'name': u'Parallel Running'}

System Information

Trac 0.11dev
Python 2.5 (release25-maint, Feb 16 2007, 18:41:52)
[GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu1)]
MySQL 5.0.32-Debian_2-log
MySQLdb 1.2.1_p2
Genshi 0.3.6
Pygments 0.6
Subversion 1.4.2

Python Traceback

Traceback (most recent call last):
  File "/var/lib/python-support/python2.5/trac/web/main.py", line 401, in dispatch_request
    dispatcher.dispatch(req)
  File "/var/lib/python-support/python2.5/trac/web/main.py", line 213, in dispatch
    resp = chosen_handler.process_request(req)
  File "/var/lib/python-support/python2.5/trac/ticket/roadmap.py", line 414, in process_request
    self._do_save(req, db, milestone)
  File "/var/lib/python-support/python2.5/trac/ticket/roadmap.py", line 461, in _do_save
    if milestone.completed > datetime.now(utc):
TypeError: can't compare datetime.datetime to NoneType

Attachments (0)

Change History (1)

comment:1 by Christian Boos, 18 years ago

Resolution: worksforme
Status: newclosed

The current corresponding code looks rather like:

            if milestone.completed and milestone.completed > datetime.now(utc):

so I think this is no longer an issue with latest trunk.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jonas Borgström.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jonas Borgström to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.