Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/places.py
diff options
context:
space:
mode:
Diffstat (limited to 'places.py')
-rw-r--r--places.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/places.py b/places.py
index 8b98c79..5001b43 100644
--- a/places.py
+++ b/places.py
@@ -24,9 +24,9 @@ _store = None
class Place(object):
- def __init__(self, uri=None):
+ def __init__(self, uri=''):
self.uri = uri
- self.title = None
+ self.title = ''
self.bookmark = False
self.gecko_flags = 0
self.visits = 0
@@ -121,6 +121,14 @@ class SqliteStore(object):
def _place_from_row(self, row):
place = Place()
+ # Return uri and title as empty strings instead of None.
+ # Previous versions of Browse were allowing to store None for
+ # those fields in the places database. See ticket #3400 .
+ if row[0] == None:
+ row = tuple([''] + list(row[1:]))
+ if row[1] == None:
+ row = tuple([row[0], ''] + list(row[2:]))
+
place.uri, place.title, place.bookmark, place.gecko_flags, \
place.visits, place.last_visit = row