Opened 13 years ago

Last modified 11 years ago

#8184 closed defect

[Patch] Milestone not start with TypeError — at Version 1

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

Change History (1)

comment:1 Changed 13 years ago by Ryan J Ollos

Description: modified (diff)
Summary: Milestone not start with TypeError[Patch] Milestone not start with TypeError
Note: See TracTickets for help on using tickets.