Modify

Opened 3 years ago

Closed 11 months ago

#8184 closed defect (duplicate)

[Patch] Milestone not start with TypeError

Reported by: okamototk Owned by: sambloomquist
Priority: high Component: ScrumBurndownPlugin
Severity: major Keywords:
Cc: Trac Release: 0.12

Description (last modified by rjollos)

With Trac 0.12, milestone is not started with TypeError.

The following patch resolves the problem.

def get_startdate_for_milestone(db, milestone):
    cursor = db.cursor()
    cursor.execute("SELECT started FROM milestone WHERE name = %s", [milestone])
    row = cursor.fetchone()
-    if(row and row[0]!=0):
-        return datetime.fromtimestamp(row[0])
-    else:
-        return None
+    try:
+        if(row and row[0]!=0):
+            return datetime.fromtimestamp(row[0])
+    except TypeError:
+        pass
+    return None

Attachments (0)

Change History (2)

comment:1 Changed 3 years ago by rjollos

  • Description modified (diff)
  • Summary changed from Milestone not start with TypeError to [Patch] Milestone not start with TypeError

comment:2 Changed 11 months ago by rjollos

  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #4504. Please install the latest from the trunk.

Add Comment

Modify Ticket

Action
as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from sambloomquist. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.