Commits

Miki Tebeka committed 2822190 Merge

Merge user-urls

  • Participants
  • Parent commits a7af6a0, f70d94e
  • Branches queue

Comments (0)

Files changed (1)

 
 def user_urls(user, max=100):
     '''Last 100 urls for user.'''
-    return Url.all().filter('user =' , user).order('-created').fetch(max)
+    try:
+        return Url.all().filter('user =' , user).order('-created').fetch(max)
+    except db.NeedIndexError: # AppEngine initial indexing might take a while
+        log.error('Not indexed yet')
+        return []
 
 def fix_url(url):
     '''Fix url by appending http:// if needed.