Modify

Opened 14 years ago

Closed 12 years ago

#8184 closed defect (duplicate)

[Patch] Milestone not start with TypeError

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

Description (last modified by Ryan J Ollos)

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 14 years ago by Ryan J Ollos

Description: modified (diff)
Summary: Milestone not start with TypeError[Patch] Milestone not start with TypeError

comment:2 Changed 12 years ago by Ryan J Ollos

Resolution: duplicate
Status: newclosed

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

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Sam Bloomquist.
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.