From 2717d8e51517ca76c52d4a520310fc63c86fe5ed Mon Sep 17 00:00:00 2001 From: ketralnis Date: Wed, 27 Aug 2008 13:09:43 -0700 Subject: [PATCH] fix buttons (missing argument to _by_url) --- r2/r2/controllers/api.py | 2 +- r2/r2/controllers/buttons.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/r2/r2/controllers/api.py b/r2/r2/controllers/api.py index 11990aad7..5c2f6e0e3 100644 --- a/r2/r2/controllers/api.py +++ b/r2/r2/controllers/api.py @@ -1035,7 +1035,7 @@ class ApiController(RedditController): uh = request.get.get('uh', "") try: - links = Link._by_url(url) + links = Link._by_url(url,None) except: links = [] diff --git a/r2/r2/controllers/buttons.py b/r2/r2/controllers/buttons.py index d713725d4..0f39d51b1 100644 --- a/r2/r2/controllers/buttons.py +++ b/r2/r2/controllers/buttons.py @@ -41,7 +41,7 @@ class ButtonsController(RedditController): css = nop('css')) def GET_button_content(self, url, title, css): try: - links = Link._by_url(url) + links = Link._by_url(url,None) #find the one with the highest score l = max(links, key = lambda x: x._score)