Commits

jun...@7322e99d-02ea-0310-aa39-e9a107903beb  committed 5afddaa

bookmarkplugin: refs #8952, workaround, uses empty string instead of NULL for name column when inserting bookmarks record

  • Participants
  • Parent commits a99cfe4

Comments (0)

Files changed (1)

File bookmarkplugin/trunk/tracbookmark/__init__.py

     bookmark_path = re.compile(r'/bookmark')
     path_match = re.compile(r'/bookmark/(add|delete|delete_in_page)/(.*)')
 
-    image_map = { 'on'  : 'bookmark_on.png',
-                  'off' : 'bookmark_off.png', }
-
     ### public methods
 
     def get_bookmarks(self, req):
 
         db = self.env.get_db_cnx()
         cursor = db.cursor()
-        cursor.execute('INSERT INTO bookmarks (resource, username) '
-                       'VALUES (%s, %s)',
-                       (resource, get_reporter_id(req)))
+        cursor.execute(
+            "INSERT INTO bookmarks (resource,name,username) VALUES (%s,%s,%s)",
+            (resource, '', get_reporter_id(req)))
         db.commit()
 
     def delete_bookmark(self, req, resource):